From 3c9e97f4322b3985bbf7fb604832ae5f848a870c Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sat, 26 Jan 2019 16:45:52 +0000 Subject: [PATCH 01/22] Update jest to version 24.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6aa4928f..7b90b9a0a 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "istanbul": "^0.4.5", "jasmine": "~3.3.1", "jasmine-core": "^3.1.0", - "jest": "^23.0.0", + "jest": "^24.0.0", "karma": "4.0.1", "karma-browserstack-launcher": "1.4.0", "karma-chrome-launcher": "2.2.0", From 7a43187ec3f93163e09ea8538a49a71e0a896bcd Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 28 Jan 2019 23:04:38 +0100 Subject: [PATCH 02/22] Move babel-runtime to dev deps, use ^ version range --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b90b9a0a..3adf8b0c9 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "dependencies": { "array-changes": "3.0.1", "array-changes-async": "3.0.1", - "babel-runtime": "6.26.0", "detect-indent": "3.0.1", "diff": "4.0.1", "greedy-interval-packer": "1.2.0", @@ -36,6 +35,7 @@ "babel-cli": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-es2015-without-strict": "^0.0.4", + "babel-runtime": "^6.26.0", "coveralls": "^3.0.0", "eslint": "^5.11.1", "eslint-config-prettier": "^4.0.0", From e8d7277900d0dd038dabcbb6f33dc06d2d4f9e99 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 28 Jan 2019 23:07:50 +0100 Subject: [PATCH 03/22] setupTestFrameworkScriptFile => setupFilesAfterEnv to fix jest deprecation warning --- package.json | 2 +- test/jest.es5.config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3adf8b0c9..bb70f4791 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "setupFiles": [ "/test/promisePolyfill" ], - "setupTestFrameworkScriptFile": "/test/common.js", + "setupFilesAfterEnv": ["/test/common.js"], "testMatch": [ "/test/**.spec.js" ], diff --git a/test/jest.es5.config.json b/test/jest.es5.config.json index 02a063955..349aab650 100644 --- a/test/jest.es5.config.json +++ b/test/jest.es5.config.json @@ -1,5 +1,5 @@ { "setupFiles": ["/build/test/promisePolyfill.js"], - "setupTestFrameworkScriptFile": "/build/test/common.js", + "setupFilesAfterEnv": ["/build/test/common.js"], "testMatch": ["/build/test/**.spec.js"] } From 2c1b687b01df7cea720caa563c5d156a6f8b352e Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 28 Jan 2019 23:20:32 +0100 Subject: [PATCH 04/22] Update to babel 7 --- .babelrc | 11 ++++------- package.json | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.babelrc b/.babelrc index 67a2584e1..d64dd0234 100644 --- a/.babelrc +++ b/.babelrc @@ -2,21 +2,18 @@ "env": { "development": { "presets": [ - "es2015-without-strict" + "@babel/env" ], "plugins": [ - ["transform-runtime", { - "polyfill": false - }] + ["@babel/plugin-transform-runtime"] ] }, "test": { "presets": [ - "es2015-without-strict" + "@babel/env" ], "plugins": [ - ["transform-runtime", { - "polyfill": false, + ["@babel/plugin-transform-runtime", { "helpers": false }] ] diff --git a/package.json b/package.json index bb70f4791..9371b4566 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,10 @@ "unexpected-bluebird": "2.9.34-longstack2" }, "devDependencies": { - "babel-cli": "^6.26.0", - "babel-plugin-transform-runtime": "^6.23.0", - "babel-preset-es2015-without-strict": "^0.0.4", - "babel-runtime": "^6.26.0", + "@babel/cli": "^7.2.3", + "@babel/plugin-transform-runtime": "^7.2.0", + "@babel/preset-env": "^7.3.1", + "@babel/runtime": "^7.3.1", "coveralls": "^3.0.0", "eslint": "^5.11.1", "eslint-config-prettier": "^4.0.0", From 00154ddef76ea8a2d362a958e22779bf583bc2c3 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Mon, 28 Jan 2019 23:39:46 +0100 Subject: [PATCH 05/22] @babel/cli no longer supports --quiet, remove it --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 683f93733..d71f393d9 100644 --- a/Makefile +++ b/Makefile @@ -16,14 +16,14 @@ lint: .PHONY: lint build/lib: lib/* - ./node_modules/.bin/babel --copy-files --out-dir build/lib --quiet lib + ./node_modules/.bin/babel --copy-files --out-dir build/lib lib build/test: $(shell find test -type f) - BABEL_ENV=test ./node_modules/.bin/babel --copy-files --out-dir build/test --quiet test + BABEL_ENV=test ./node_modules/.bin/babel --copy-files --out-dir build/test test sed -i -e 's#--require ./test#--require ./build/test#g' ./build/test/mocha.opts build/externaltests: externaltests/* - ./node_modules/.bin/babel --copy-files --out-dir build/externaltests --quiet externaltests + ./node_modules/.bin/babel --copy-files --out-dir build/externaltests externaltests build: build/lib build/test build/externaltests From a080f41d3315e3cf2be99199ae11ea1ca56108b1 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 00:00:51 +0100 Subject: [PATCH 06/22] Revert "setupTestFrameworkScriptFile => setupFilesAfterEnv to fix jest deprecation warning" This reverts commit 8304148d0542c510229f10164d6859850ff0065e. --- package.json | 2 +- test/jest.es5.config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9371b4566..0c671b505 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "setupFiles": [ "/test/promisePolyfill" ], - "setupFilesAfterEnv": ["/test/common.js"], + "setupTestFrameworkScriptFile": "/test/common.js", "testMatch": [ "/test/**.spec.js" ], diff --git a/test/jest.es5.config.json b/test/jest.es5.config.json index 349aab650..02a063955 100644 --- a/test/jest.es5.config.json +++ b/test/jest.es5.config.json @@ -1,5 +1,5 @@ { "setupFiles": ["/build/test/promisePolyfill.js"], - "setupFilesAfterEnv": ["/build/test/common.js"], + "setupTestFrameworkScriptFile": "/build/test/common.js", "testMatch": ["/build/test/**.spec.js"] } From b126250a5c8bc076c8ce029303c9f8c954d2d896 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 00:23:26 +0100 Subject: [PATCH 07/22] Try to set modules:false in the @babel/env config This is an attempt to fix this error: Variable undefined in strict mode at build/test/promisePolyfill.js:5:3 ReferenceError: Variable undefined in strict mode at Global code (build/test/promisePolyfill.js:5:3) Inspired by: https://stackoverflow.com/questions/46271369/remove-global-use-strict-from-babel-preset-env --- .babelrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index d64dd0234..62345395e 100644 --- a/.babelrc +++ b/.babelrc @@ -5,7 +5,9 @@ "@babel/env" ], "plugins": [ - ["@babel/plugin-transform-runtime"] + ["@babel/plugin-transform-runtime", { + "modules": false + }] ] }, "test": { @@ -14,7 +16,8 @@ ], "plugins": [ ["@babel/plugin-transform-runtime", { - "helpers": false + "helpers": false, + "modules": false }] ] } From 9671a407b3b7f1a58fa7e2899398ada9ad182a2f Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 00:49:22 +0100 Subject: [PATCH 08/22] Use babel-plugin-transform-remove-strict-mode to prevent babel from injecting 'use strict'; --- .babelrc | 6 ++++-- package.json | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 62345395e..bc81d4864 100644 --- a/.babelrc +++ b/.babelrc @@ -7,7 +7,8 @@ "plugins": [ ["@babel/plugin-transform-runtime", { "modules": false - }] + }], + "transform-remove-strict-mode" ] }, "test": { @@ -18,7 +19,8 @@ ["@babel/plugin-transform-runtime", { "helpers": false, "modules": false - }] + }], + "transform-remove-strict-mode" ] } } diff --git a/package.json b/package.json index 0c671b505..71a0e4811 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", + "babel-plugin-transform-remove-strict-mode": "0.0.2", "coveralls": "^3.0.0", "eslint": "^5.11.1", "eslint-config-prettier": "^4.0.0", From c182b999282211303c89dc3f6988af9fcc4a4829 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 01:06:37 +0100 Subject: [PATCH 09/22] .babelrc: Use sourceType:script instead of babel-plugin-transform-remove-strict-mode --- .babelrc | 7 +++---- package.json | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.babelrc b/.babelrc index bc81d4864..12a331e95 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,5 @@ { + "sourceType": "script", "env": { "development": { "presets": [ @@ -7,8 +8,7 @@ "plugins": [ ["@babel/plugin-transform-runtime", { "modules": false - }], - "transform-remove-strict-mode" + }] ] }, "test": { @@ -19,8 +19,7 @@ ["@babel/plugin-transform-runtime", { "helpers": false, "modules": false - }], - "transform-remove-strict-mode" + }] ] } } diff --git a/package.json b/package.json index 71a0e4811..0c671b505 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", - "babel-plugin-transform-remove-strict-mode": "0.0.2", "coveralls": "^3.0.0", "eslint": "^5.11.1", "eslint-config-prettier": "^4.0.0", From 7db308e34db59ec8c3ceb2302833952bebcd941e Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 07:52:29 +0100 Subject: [PATCH 10/22] Tweak tests to avoid output differences with babel 7 --- ...be-fulfilled-with-value-satisfying.spec.js | 41 ++++++++----------- test/types/function-type.spec.js | 10 ++--- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/test/assertions/to-be-fulfilled-with-value-satisfying.spec.js b/test/assertions/to-be-fulfilled-with-value-satisfying.spec.js index 8997d1c08..6dd8591be 100644 --- a/test/assertions/to-be-fulfilled-with-value-satisfying.spec.js +++ b/test/assertions/to-be-fulfilled-with-value-satisfying.spec.js @@ -156,42 +156,35 @@ describe('to be fulfilled with value satisfying assertion', () => { }); it('errors with the correct error', () => { + // Helper function to prevent function inspection from differing + // when the test suite has been through babel: + function makePromise() { + return Promise.resolve({ + foo: 'foo', + bar: 'bar' + }); + } return expect( function() { return expect( - function() { - return Promise.resolve({ - foo: 'foo', - bar: 'bar', - quux: 'quux' - }); - }, + // prettier-ignore + function() { return makePromise(); }, 'to be fulfilled with value exhaustively satisfying', { - foo: 'foo', - bar: 'bar' + foo: 'foo' } ); }, 'to be rejected with', - 'expected\n' + - 'function () {\n' + - ' return Promise.resolve({\n' + - " foo: 'foo',\n" + - " bar: 'bar',\n" + - " quux: 'quux'\n" + - ' });\n' + - '}\n' + - "to be fulfilled with value exhaustively satisfying { foo: 'foo', bar: 'bar' }\n" + - " expected Promise (fulfilled) => { foo: 'foo', bar: 'bar', quux: 'quux' }\n" + - " to be fulfilled with value exhaustively satisfying { foo: 'foo', bar: 'bar' }\n" + - " expected { foo: 'foo', bar: 'bar', quux: 'quux' }\n" + - " to exhaustively satisfy { foo: 'foo', bar: 'bar' }\n" + + 'expected function () { return makePromise(); }\n' + + "to be fulfilled with value exhaustively satisfying { foo: 'foo' }\n" + + " expected Promise (fulfilled) => { foo: 'foo', bar: 'bar' }\n" + + " to be fulfilled with value exhaustively satisfying { foo: 'foo' }\n" + + " expected { foo: 'foo', bar: 'bar' } to exhaustively satisfy { foo: 'foo' }\n" + '\n' + ' {\n' + " foo: 'foo',\n" + - " bar: 'bar',\n" + - " quux: 'quux' // should be removed\n" + + " bar: 'bar' // should be removed\n" + ' }' ); }); diff --git a/test/types/function-type.spec.js b/test/types/function-type.spec.js index 09cf98882..355204810 100644 --- a/test/types/function-type.spec.js +++ b/test/types/function-type.spec.js @@ -71,11 +71,11 @@ describe('function type', () => { expect( // prettier-ignore function() { - var a = 123 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2;a = 456; + var a = 123 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2; }, 'to inspect as', 'function () {\n' + - ' var a = 123 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2;a = 456;\n' + + ' var a = 123 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2;\n' + '}' ); /* eslint-enable no-unused-vars */ @@ -93,10 +93,10 @@ describe('function type', () => { expect( // prettier-ignore function() { - var a = 123;a = 456; // foo - }, + var a = 123; // foo + }, 'to inspect as', - 'function () {\n' + ' var a = 123;a = 456; // foo\n' + '}' + 'function () {\n' + ' var a = 123; // foo\n' + '}' ); /* eslint-enable no-unused-vars */ }); From b58a3a67d7307526e08f4f92aef53e7ce8edada5 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Tue, 29 Jan 2019 23:07:40 +0100 Subject: [PATCH 11/22] babel: Add generatorOpts.retainLines --- .babelrc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.babelrc b/.babelrc index 12a331e95..7f03aa978 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,8 @@ { "sourceType": "script", + "generatorOpts": { + "retainLines": true + }, "env": { "development": { "presets": [ From 23f6d7292ed5d031265601b0b4593bec64cb922f Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Wed, 30 Jan 2019 00:29:07 +0100 Subject: [PATCH 12/22] Try adding @babel/polyfill to see if that helps with IE11 --- .babelrc | 10 ++++++++-- package.json | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 7f03aa978..67d6e09d4 100644 --- a/.babelrc +++ b/.babelrc @@ -6,7 +6,10 @@ "env": { "development": { "presets": [ - "@babel/env" + "@babel/env", + { + "useBuiltIns": "usage" + } ], "plugins": [ ["@babel/plugin-transform-runtime", { @@ -16,7 +19,10 @@ }, "test": { "presets": [ - "@babel/env" + "@babel/env", + { + "useBuiltIns": "usage" + } ], "plugins": [ ["@babel/plugin-transform-runtime", { diff --git a/package.json b/package.json index 0c671b505..8a776d5db 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@babel/cli": "^7.2.3", "@babel/plugin-transform-runtime": "^7.2.0", + "@babel/polyfill": "^7.2.5", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", "coveralls": "^3.0.0", From 1f14b6082d75a4dd3ef017ee09e9c5523128d0e1 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Wed, 30 Jan 2019 01:23:45 +0100 Subject: [PATCH 13/22] Revert me: Fix Symbol bug in unexpected.js after generating it (breaks source map) --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d71f393d9..24278675c 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,7 @@ build: build/lib build/test build/externaltests ${TARGETS}: build ./node_modules/.bin/rollup --config rollup.config.js --sourcemap --format umd --name weknowhow.expect -o unexpected.js build/lib/index.js + sed -e "s/Symbol.iterator in Object/typeof Symbol === 'function' \&\& Symbol.iterator in Object/;" -i unexpected.js test-jasmine: ./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/support/jasmine.json From d9e11ff96b0e9921027761c6b1ca10bc1a00262d Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Wed, 30 Jan 2019 01:24:24 +0100 Subject: [PATCH 14/22] Revert "Try adding @babel/polyfill to see if that helps with IE11" This reverts commit 0dd9f9fa92341d1f7613d93c94168a1ebfeb868c. --- .babelrc | 10 ++-------- package.json | 1 - 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.babelrc b/.babelrc index 67d6e09d4..7f03aa978 100644 --- a/.babelrc +++ b/.babelrc @@ -6,10 +6,7 @@ "env": { "development": { "presets": [ - "@babel/env", - { - "useBuiltIns": "usage" - } + "@babel/env" ], "plugins": [ ["@babel/plugin-transform-runtime", { @@ -19,10 +16,7 @@ }, "test": { "presets": [ - "@babel/env", - { - "useBuiltIns": "usage" - } + "@babel/env" ], "plugins": [ ["@babel/plugin-transform-runtime", { diff --git a/package.json b/package.json index 8a776d5db..0c671b505 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,6 @@ "devDependencies": { "@babel/cli": "^7.2.3", "@babel/plugin-transform-runtime": "^7.2.0", - "@babel/polyfill": "^7.2.5", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", "coveralls": "^3.0.0", From dc7c4d17a5d78fbb8bd5b26238e99bf4b4bb6de7 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 31 Jan 2019 00:58:08 +0100 Subject: [PATCH 15/22] Let's try without @babel/plugin-transform-runtime --- .babelrc | 11 ----------- package.json | 1 - 2 files changed, 12 deletions(-) diff --git a/.babelrc b/.babelrc index 7f03aa978..9da5787e3 100644 --- a/.babelrc +++ b/.babelrc @@ -7,22 +7,11 @@ "development": { "presets": [ "@babel/env" - ], - "plugins": [ - ["@babel/plugin-transform-runtime", { - "modules": false - }] ] }, "test": { "presets": [ "@babel/env" - ], - "plugins": [ - ["@babel/plugin-transform-runtime", { - "helpers": false, - "modules": false - }] ] } } diff --git a/package.json b/package.json index 0c671b505..15a7e4171 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,6 @@ }, "devDependencies": { "@babel/cli": "^7.2.3", - "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", "coveralls": "^3.0.0", From dd55a64dd127a8625a3f01ceefce685553214fe9 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 31 Jan 2019 01:15:19 +0100 Subject: [PATCH 16/22] useBuiltIns: usage --- .babelrc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 9da5787e3..ee8f044cf 100644 --- a/.babelrc +++ b/.babelrc @@ -6,12 +6,22 @@ "env": { "development": { "presets": [ - "@babel/env" + [ + "@babel/preset-env", + { + "useBuiltIns": "usage" + } + ] ] }, "test": { "presets": [ - "@babel/env" + [ + "@babel/preset-env", + { + "useBuiltIns": "usage" + } + ] ] } } From 20b4f90fd3bf6d2e2073d74f73e257808f87bbcb Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 31 Jan 2019 01:16:31 +0100 Subject: [PATCH 17/22] Revert "Let's try without @babel/plugin-transform-runtime" This reverts commit 72f2de5a0892b0affa2769d1b64aafe867c86cdd. --- .babelrc | 11 +++++++++++ package.json | 1 + 2 files changed, 12 insertions(+) diff --git a/.babelrc b/.babelrc index ee8f044cf..dbb9bbcaa 100644 --- a/.babelrc +++ b/.babelrc @@ -12,6 +12,11 @@ "useBuiltIns": "usage" } ] + ], + "plugins": [ + ["@babel/plugin-transform-runtime", { + "modules": false + }] ] }, "test": { @@ -22,6 +27,12 @@ "useBuiltIns": "usage" } ] + ], + "plugins": [ + ["@babel/plugin-transform-runtime", { + "helpers": false, + "modules": false + }] ] } } diff --git a/package.json b/package.json index 15a7e4171..0c671b505 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ }, "devDependencies": { "@babel/cli": "^7.2.3", + "@babel/plugin-transform-runtime": "^7.2.0", "@babel/preset-env": "^7.3.1", "@babel/runtime": "^7.3.1", "coveralls": "^3.0.0", From 5d423bb26ded1391b204d6a1f22a62b90d81282c Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 31 Jan 2019 01:17:26 +0100 Subject: [PATCH 18/22] Remove useBuiltIns --- .babelrc | 2 -- 1 file changed, 2 deletions(-) diff --git a/.babelrc b/.babelrc index dbb9bbcaa..2f2796930 100644 --- a/.babelrc +++ b/.babelrc @@ -9,7 +9,6 @@ [ "@babel/preset-env", { - "useBuiltIns": "usage" } ] ], @@ -24,7 +23,6 @@ [ "@babel/preset-env", { - "useBuiltIns": "usage" } ] ], From f9eb8e0837bfe401d6a0ff0a21e8b4cbbe622b9b Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Thu, 31 Jan 2019 08:59:05 +0100 Subject: [PATCH 19/22] Also patch up Array.from usage --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 24278675c..979a7efa1 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,7 @@ build: build/lib build/test build/externaltests ${TARGETS}: build ./node_modules/.bin/rollup --config rollup.config.js --sourcemap --format umd --name weknowhow.expect -o unexpected.js build/lib/index.js sed -e "s/Symbol.iterator in Object/typeof Symbol === 'function' \&\& Symbol.iterator in Object/;" -i unexpected.js + sed -e "s/Array\.from/Array.prototype.slice.call/g;" -i unexpected.js test-jasmine: ./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/support/jasmine.json From 911ca334ef8e398a5929d10e8025e940cdb11006 Mon Sep 17 00:00:00 2001 From: Andreas Lind Date: Wed, 6 Feb 2019 22:02:08 +0100 Subject: [PATCH 20/22] Update jest to ^24.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c671b505..9a462f775 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "istanbul": "^0.4.5", "jasmine": "~3.3.1", "jasmine-core": "^3.1.0", - "jest": "^24.0.0", + "jest": "^24.1.0", "karma": "4.0.1", "karma-browserstack-launcher": "1.4.0", "karma-chrome-launcher": "2.2.0", From 7149b267dbf85f116e9bcda0c931cd010a75b95e Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Wed, 13 Mar 2019 08:51:50 +0100 Subject: [PATCH 21/22] Update to jest 24.5 --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9a462f775..545aea888 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "istanbul": "^0.4.5", "jasmine": "~3.3.1", "jasmine-core": "^3.1.0", - "jest": "^24.1.0", + "jest": "^24.5.0", "karma": "4.0.1", "karma-browserstack-launcher": "1.4.0", "karma-chrome-launcher": "2.2.0", @@ -89,9 +89,11 @@ "setupFiles": [ "/test/promisePolyfill" ], - "setupTestFrameworkScriptFile": "/test/common.js", + "setupFilesAfterEnv": [ + "/test/common.js" + ], "testMatch": [ - "/test/**.spec.js" + "/test/**/*.spec.js" ], "testURL": "http://localhost/", "transformIgnorePatterns": [ From d381525baeeddd442d0b61ba568b168c999eeed3 Mon Sep 17 00:00:00 2001 From: Sune Simonsen Date: Wed, 13 Mar 2019 13:57:05 +0100 Subject: [PATCH 22/22] Let's see what happens if we don't patch Array.from and Symbol.iterator --- Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Makefile b/Makefile index 979a7efa1..d71f393d9 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,6 @@ build: build/lib build/test build/externaltests ${TARGETS}: build ./node_modules/.bin/rollup --config rollup.config.js --sourcemap --format umd --name weknowhow.expect -o unexpected.js build/lib/index.js - sed -e "s/Symbol.iterator in Object/typeof Symbol === 'function' \&\& Symbol.iterator in Object/;" -i unexpected.js - sed -e "s/Array\.from/Array.prototype.slice.call/g;" -i unexpected.js test-jasmine: ./node_modules/.bin/jasmine JASMINE_CONFIG_PATH=test/support/jasmine.json