upgrade testing to es6

This commit is contained in:
Devin Howard 2016-09-22 16:30:20 +08:00
parent d97b5c2977
commit c0f63abc59
2 changed files with 6 additions and 6 deletions

View file

@ -1,13 +1,13 @@
/* global describe, it */ /* global describe, it */
const chai = require('chai')
const expect = chai.expect
Metamaps = {} import chai from 'chai'
require('../../app/assets/javascripts/src/Metamaps.Import') import Import from '../src/Metamaps/Import'
const { expect } = chai
describe('Metamaps.Import.js', function () { describe('Metamaps.Import.js', function () {
it('has a topic whitelist', function () { it('has a topic whitelist', function () {
expect(Metamaps.Import.topicWhitelist).to.deep.equal( expect(Import.topicWhitelist).to.deep.equal(
['id', 'name', 'metacode', 'x', 'y', 'description', 'link', 'permission'] ['id', 'name', 'metacode', 'x', 'y', 'description', 'link', 'permission']
) )
}) })

View file

@ -5,7 +5,7 @@
"scripts": { "scripts": {
"build": "webpack", "build": "webpack",
"build:watch": "webpack --watch", "build:watch": "webpack --watch",
"test": "mocha frontend/test || (echo 'Run `npm install` to setup testing' && false)" "test": "mocha --compilers js:babel-core/register frontend/test || (echo 'Run `npm install` to setup testing' && false)"
}, },
"repository": { "repository": {
"type": "git", "type": "git",