From 5098ebe66b0afdf9435ddeeaebaa707548231e16 Mon Sep 17 00:00:00 2001 From: Brenton Simpson Date: Tue, 21 Nov 2017 10:06:07 -0800 Subject: [PATCH] fix(tests): module-types `esModule: true` is now `type: 'module'`. Test updated to reflect that. --- test/e2e/module-types.feature | 17 ++++++++++------- .../support/modules/__tests__/minus.test.mjs | 4 ++-- test/e2e/support/modules/__tests__/plus.test.js | 4 ++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/test/e2e/module-types.feature b/test/e2e/module-types.feature index d4f6153db..c84d4084c 100644 --- a/test/e2e/module-types.feature +++ b/test/e2e/module-types.feature @@ -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 """ diff --git a/test/e2e/support/modules/__tests__/minus.test.mjs b/test/e2e/support/modules/__tests__/minus.test.mjs index 1d79390fc..4f1401794 100644 --- a/test/e2e/support/modules/__tests__/minus.test.mjs +++ b/test/e2e/support/modules/__tests__/minus.test.mjs @@ -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) }) }) diff --git a/test/e2e/support/modules/__tests__/plus.test.js b/test/e2e/support/modules/__tests__/plus.test.js index 291d93491..305f9589f 100644 --- a/test/e2e/support/modules/__tests__/plus.test.js +++ b/test/e2e/support/modules/__tests__/plus.test.js @@ -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) }) })