Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Commit

Permalink
fix: remove broken handling of "target": "node" (#92)
Browse files Browse the repository at this point in the history
BRAKING CHANGE: the `node` target doesn't supported
  • Loading branch information
AviVahl authored Mar 24, 2020
1 parent 72d54c1 commit b84eb10
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
56 changes: 0 additions & 56 deletions src/EnhancedMocha.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import validateOptions from 'schema-utils';
import schema from './options.json';

const startScriptPath = require.resolve('./start.js');
const enhancedMochaPath = require.resolve('./EnhancedMocha.js');
const mochaJs = require.resolve('mocha/mocha.js');
const mochaCss = require.resolve('mocha/mocha.css');
const { stringify } = JSON;
Expand Down Expand Up @@ -44,17 +43,6 @@ export function pitch(req) {
source.push('\t\treport && report.parentNode.removeChild(report);');
source.push('\t});');
source.push('}');
} else if (this.target === 'node') {
source.push(
`import EnhancedMocha from ${stringify(`!!${enhancedMochaPath}`)};`
);
source.push(
`const mocha = new EnhancedMocha({reporter: ${stringify(
options.reporter || 'spec'
)}});`
);
source.push(`mocha.addFile(${stringify(`!!${req}`)});`);
source.push('mocha.watch();');
} else {
throw new Error(`Unsupported target environment ${this.target}`);
}
Expand Down

0 comments on commit b84eb10

Please sign in to comment.