Skip to content

Commit

Permalink
fix: babel hook problem
Browse files Browse the repository at this point in the history
  • Loading branch information
deleonio committed Jan 9, 2022
1 parent ad06e16 commit fa80f56
Show file tree
Hide file tree
Showing 16 changed files with 791 additions and 8,034 deletions.
17 changes: 1 addition & 16 deletions packages/form/.mocharc.js
Expand Up @@ -4,26 +4,11 @@
// If you need conditional logic, you might want to use this type of config.
// Otherwise, JSON or YAML is recommended.

const path = require('path');

module.exports = {
diff: true,
extension: ['js', 'jsx', 'ts', 'tsx'],
opts: false,
// package: './package.json',
reporter: 'spec',
require: [
path.resolve(process.cwd(), 'babel.register'), // babel.register.js statt @babel/register - https://babeljs.io/docs/en/babel-register
'jsdom-global/register',
'esm',
'mock-local-storage',
],
slow: 75,
require: ['esbuild-register', 'jsdom-global/register', 'mock-local-storage'],
spec: ['src/**/*.spec.*s*', 'src/**/*.test.*s*', 'tests/unit/**/*.spec.*s*', 'tests/unit/**/*.test.*s*'],
timeout: 2000,
ui: 'bdd',
'watch-files': this.spec,
// 'watch-ignore': []
};

// Source: https://github.com/mochajs/mocha/tree/master/example/config
38 changes: 0 additions & 38 deletions packages/form/babel.config.js

This file was deleted.

7 changes: 0 additions & 7 deletions packages/form/babel.register.js

This file was deleted.

10 changes: 5 additions & 5 deletions packages/form/nyc.config.js
Expand Up @@ -7,7 +7,7 @@ module.exports = {
reporter: ['html', 'lcov', 'text'],
'report-dir': path.resolve(process.cwd(), '.reports/coverage'),
'temp-dir': path.resolve(process.cwd(), '.reports/nyc'),
require: [path.resolve(process.cwd(), 'babel.register.js')],
require: ['esm', 'esbuild-register'],
watermarks: {
lines: [50, 75],
functions: [50, 75],
Expand All @@ -16,8 +16,8 @@ module.exports = {
},
sourceMap: false,
instrument: true,
statements: 79,
branches: 54,
functions: 70,
lines: 79,
statements: 84,
branches: 64,
functions: 76,
lines: 85,
};

0 comments on commit fa80f56

Please sign in to comment.