Skip to content

Commit

Permalink
fix(tests): module-types
Browse files Browse the repository at this point in the history
`esModule: true` is now `type: 'module'`.  Test updated to reflect that.
  • Loading branch information
appsforartists committed Nov 22, 2017
1 parent c50c8f2 commit 96497c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
17 changes: 10 additions & 7 deletions test/e2e/module-types.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ Feature: ES Modules
Given a configuration with:
"""
files = [
{ pattern: 'modules/plus.js', esModule: false },
{ pattern: 'modules/minus.mjs', esModule: true },
'modules/test.js'
{ pattern: 'modules/__tests__/plus.test.js', type: 'module' },
{ pattern: 'modules/plus.js', type: 'module' },
{ pattern: 'modules/__tests__/minus.test.mjs', type: 'module' },
{ pattern: 'modules/minus.mjs', type: 'module' }
];
browsers = ['Firefox'];
browsers = ['Chrome'];
frameworks = ['mocha', 'chai'];
plugins = [
'karma-jasmine',
'karma-firefox-launcher'
'karma-mocha',
'karma-chai',
'karma-chrome-launcher'
];
"""
When I start Karma
Then it passes with:
"""
..
Firefox
Chrome
"""
4 changes: 2 additions & 2 deletions test/e2e/support/modules/__tests__/minus.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { minus } from '../minus.mjs'

describe('minus', function () {
it('should pass', function () {
expect(true).toBe(true)
expect(true).to.be.true;
})

it('should work', function () {
expect(minus(3, 2)).toBe(1)
expect(minus(3, 2)).to.equal(1);
})
})
4 changes: 2 additions & 2 deletions test/e2e/support/modules/__tests__/plus.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { plus } from '../plus.js'

describe('plus', function () {
it('should pass', function () {
expect(true).toBe(true)
expect(true).to.be.true;
})

it('should work', function () {
expect(plus(1, 2)).toBe(3)
expect(plus(1, 2)).to.equal(3);
})
})

0 comments on commit 96497c5

Please sign in to comment.