Skip to content
Snippets Groups Projects
Commit b79f779d authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Switch from chai to @esm-bundle/chai

This has proper support for rollup while providing the same API.

This is what open-wc recommends now and uses in their @open-wc/testing package
parent d1d0bb2d
Branches
No related tags found
1 merge request!44Switch from chai to @esm-bundle/chai
Pipeline #25343 passed
Showing
with 14 additions and 60 deletions
......@@ -18,7 +18,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"glob": "^7.1.6",
......
......@@ -20,13 +20,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
plugins: [
del({
targets: 'dist/*'
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import {Router} from '../src/router.js';
......
......@@ -20,7 +20,7 @@
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-url": "^6.0.0",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"glob": "^7.1.6",
......
......@@ -22,13 +22,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
plugins: [
del({
targets: 'dist/*'
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import '../src/dbp-auth';
import '../src/dbp-auth-demo';
......
......@@ -19,7 +19,7 @@
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
......
......@@ -22,13 +22,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
plugins: [
del({
targets: 'dist/*'
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import '../src/dbp-check-in-place-select.js';
import '../src/demo.js';
......
......@@ -14,7 +14,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"karma": "^6.0.0",
......
......@@ -21,13 +21,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
plugins: [
del({
targets: 'dist/*'
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import {createLinkedAbortController, createTimeoutAbortSignal} from '../src/abort.js';
suite('abort', () => {
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import {EventBus, createEventName, checkIndentifier} from '../src/eventbus.js';
suite('helpers', () => {
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import * as i18next from '../i18next.js';
suite('i18next', () => {
......
import {expect, assert} from 'chai';
import {expect, assert} from '@esm-bundle/chai';
import * as utils from '../utils';
import * as styles from '../styles';
import '../jsonld.js';
......
......@@ -18,7 +18,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-url": "^6.0.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"glob": "^7.1.6",
......
......@@ -23,17 +23,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore "suggestions" warning re "use strict"
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
return;
}
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
watch: {
chokidar: true,
},
......
import {assert} from 'chai';
import {assert} from '@esm-bundle/chai';
import '../src/dbp-data-table-view';
import '../src/dbp-data-table-view-demo';
......
......@@ -17,7 +17,7 @@
"@rollup/plugin-commonjs": "^18.0.0",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^11.0.0",
"chai": "^4.2.0",
"@esm-bundle/chai": "^4.2.0",
"eslint": "^7.3.1",
"eslint-plugin-jsdoc": "^32.0.0",
"i18next-scanner": "^3.0.0",
......
......@@ -25,13 +25,6 @@ export default (async () => {
format: 'esm',
sourcemap: true
},
onwarn: function (warning, warn) {
// ignore chai warnings
if (warning.code === 'CIRCULAR_DEPENDENCY' && warning.message.includes('/chai/')) {
return;
}
warn(warning);
},
plugins: [
del({
targets: 'dist/*'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment