Last active
July 11, 2019 15:41
-
-
Save edtsech/f45ba2e6d73bdf343e890f5c143bafa4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference types="cypress"/> | |
import createEmptyDb from '../../../back-end/test/create-empty-db' | |
describe('Demo test', () => { | |
before(async () => { | |
await createEmptyDb() | |
}) | |
... | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// *********************************************************** | |
// This example plugins/index.js can be used to load plugins | |
// | |
// You can change the location of this file or turn off loading | |
// the plugins file with the 'pluginsFile' configuration option. | |
// | |
// You can read more here: | |
// https://on.cypress.io/plugins-guide | |
// *********************************************************** | |
// This function is called when a project is opened or re-opened (e.g. due to | |
// the project's config changing) | |
const path = require('path') | |
const wp = require('@cypress/webpack-preprocessor') | |
const nodeExternals = require('webpack-node-externals') | |
module.exports = (on) => { | |
const options = { | |
webpackOptions: { | |
resolve: { | |
extensions: ['.ts', '.tsx', '.mjs', '.js'] | |
}, | |
externals: { | |
// Possible drivers for knex - we'll ignore them | |
'knex': 'commonjs knex', | |
'child_process': 'child_process', | |
'fs': 'fs', | |
'dns': 'dns', | |
'net': 'net', | |
'pg-native': 'pg-native', | |
'tls': 'tls' | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.tsx?$/, | |
loader: 'ts-loader', | |
options: { transpileOnly: true } | |
} | |
] | |
} | |
} | |
} | |
on('file:preprocessor', wp(options)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"compilerOptions": { | |
"target": "esnext", | |
"lib": ["esnext", "esnext.asynciterable", "dom"], | |
"outDir": "dist", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"esModuleInterop": true, | |
"allowSyntheticDefaultImports": true, | |
"sourceMap": true, | |
"noImplicitAny": false, | |
"strict": false, | |
"inlineSources": true, | |
"types": ["node", "jest"], | |
"forceConsistentCasingInFileNames": true, | |
"suppressImplicitAnyIndexErrors": true, | |
"noUnusedLocals": true, | |
"resolveJsonModule": true, | |
"noUnusedParameters": true, | |
"experimentalDecorators": true, | |
"emitDecoratorMetadata": true, | |
"strictPropertyInitialization": false, | |
"allowUnreachableCode": false, | |
"allowJs": true, | |
"jsx": "react", | |
"preserveConstEnums": true, | |
"skipLibCheck": true | |
}, | |
"exclude": [ | |
".git", | |
"**/*.spec.js", | |
"**/node_modules/**", | |
"**/dist/**", | |
"**/build/**", | |
"./node_modules/*" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting this error: