summaryrefslogtreecommitdiffstats
path: root/public/cypress/plugins
diff options
context:
space:
mode:
authorStone, Avi (as206k) <as206k@att.com>2018-04-12 16:36:39 +0300
committerStone, Avi (as206k) <as206k@att.com>2018-04-12 16:36:39 +0300
commit9b2ceb347a3371819fcad6bbe2268203afecaf4e (patch)
treefbb5ea2c147d71dfeeec0882b215423e7b7206b4 /public/cypress/plugins
parent72dc8e3298d3e4315cdd9717b778671cb0b625bc (diff)
DCAE-D fe initial commit
DCAE-D fe initial commit Change-Id: Ica8ccb7c7ef769c969664d1e168d205eb9fc67f2 Issue-ID: SDC-1218 Signed-off-by: Stone, Avi (as206k) <as206k@att.com>
Diffstat (limited to 'public/cypress/plugins')
-rw-r--r--public/cypress/plugins/cy-ts-preprocessor.js26
-rw-r--r--public/cypress/plugins/index.js5
2 files changed, 31 insertions, 0 deletions
diff --git a/public/cypress/plugins/cy-ts-preprocessor.js b/public/cypress/plugins/cy-ts-preprocessor.js
new file mode 100644
index 0000000..7f0bba9
--- /dev/null
+++ b/public/cypress/plugins/cy-ts-preprocessor.js
@@ -0,0 +1,26 @@
+const wp = require('@cypress/webpack-preprocessor')
+
+const webpackOptions = {
+ resolve: {
+ extensions: ['.ts', '.js']
+ },
+ module: {
+ rules: [
+ {
+ test: /\.ts$/,
+ exclude: [/node_modules/],
+ use: [
+ {
+ loader: 'ts-loader'
+ }
+ ]
+ }
+ ]
+ }
+}
+
+const options = {
+ webpackOptions
+}
+
+module.exports = wp(options)
diff --git a/public/cypress/plugins/index.js b/public/cypress/plugins/index.js
new file mode 100644
index 0000000..78e782f
--- /dev/null
+++ b/public/cypress/plugins/index.js
@@ -0,0 +1,5 @@
+const cypressTypeScriptPreprocessor = require('./cy-ts-preprocessor')
+
+module.exports = on => {
+ on('file:preprocessor', cypressTypeScriptPreprocessor)
+}