make npm run test work

This commit is contained in:
Devin Howard 2017-05-06 18:08:56 -07:00
parent b1c6aec050
commit 6eccfe05ef
5 changed files with 13 additions and 10 deletions

View file

@ -1,10 +1,8 @@
/* global describe, it */
import chai from 'chai'
import { expect } from 'chai'
import Import from '../src/Metamaps/Import'
const { expect } = chai
import Import from '../../src/Metamaps/Import.js'
describe('Metamaps.Import.js', function() {
it('has a topic whitelist', function() {

View file

@ -1,10 +1,8 @@
/* global describe, it */
import chai from 'chai'
import { expect } from 'chai'
import Util from '../src/Metamaps/Util'
const { expect } = chai
import Util from '../../src/Metamaps/Util'
describe('Metamaps.Util.js', function() {
describe('splitLine', function() {

View file

@ -5,7 +5,7 @@
"scripts": {
"build": "webpack",
"build:watch": "webpack --watch",
"test": "mocha-webpack --webpack-config webpack.test.config.js --require frontend/test/support/dom.js frontend/test",
"test": "mocha-webpack --webpack-config webpack.test.config.js --require frontend/test_support/dom.js --recursive frontend/test",
"eslint": "eslint frontend",
"eslint:fix": "eslint --fix frontend"
},
@ -67,7 +67,6 @@
"jsdom": "^9.11.0",
"mocha": "^3.2.0",
"mocha-webpack": "^0.7.0",
"react-addons-test-utils": "^15.4.2",
"sinon": "^2.2.0"
},
"optionalDependencies": {

View file

@ -1,5 +1,13 @@
const config = require('./webpack.config')
config.target = 'node'
config.externals = config.externals.concat([
'react/lib/ExecutionEnvironment',
'react/lib/ReactContext',
'react/addons',
'react-test-renderer/shallow',
'react-dom/test-utils',
'canvas'
])
module.exports = config