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

fix: remove broken handling of "target": "node" #92

Merged
merged 1 commit into from
Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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