Skip to content

Commit 535cb52

Browse files
committed
feat: update import paths in ESM tests and configure esbuild alias in karma
1 parent 19d25b0 commit 535cb52

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

test/tests/acceptance/esm.test.esm.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import '../../../build/esm/plugins/all.js';
2-
3-
import { Jodit } from '../../../build/esm/index.js';
1+
import 'base/build/esm/plugins/all.js';
42

3+
import { Jodit } from 'base/build/esm/index.js';
54
import { expect } from 'chai';
65

76
describe('ESM build', () => {

tools/karma.conf.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,14 @@ module.exports = function (cnf: Config): void {
166166
],
167167

168168
preprocessors: { './**/*.test.esm.js': ['esbuild'] },
169+
// @ts-expect-error karma-esbuild does not have types
170+
esbuild: {
171+
alias: {
172+
base: argv.cwd
173+
}
174+
},
169175

170176
proxies: {
171-
'/build/esm/plugins/all.js': '/base/build/esm/plugins/all.js',
172177
'/app.css': '/base/public/app.css',
173178
'/public/app.css': '/base/public/app.css',
174179
'/tests/artio.jpg': '/base/test/tests/artio.jpg',

0 commit comments

Comments
 (0)