Skip to content

Commit

Permalink
test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed May 5, 2022
1 parent 085fb50 commit baaf6b0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 4 additions & 0 deletions js/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ module.exports = function(config) {
}, {
pattern: '../tests/test_*.js',
type: 'module'
}, {
pattern: '../../src/yafowil/widget/chosen/resources/chosen/chosen.jquery.js',
type: 'module',
included: true
}],
browsers: [
'ChromeHeadless'
Expand Down
9 changes: 8 additions & 1 deletion js/tests/test_chosen.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import { ChosenWidget } from "../src/widget";

QUnit.test('test', assert => {
assert.ok(true);
let el = $('<select class="chosen" />').appendTo('body');
let wid = new ChosenWidget(el);
assert.ok(wid);

el.remove();
wid = null;
});
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"devDependencies": {
"karma": "^6.3.17",
"karma": "^6.3.19",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage": "^2.2.0",
"karma-module-resolver-preprocessor": "^1.1.3",
"karma-qunit": "^4.1.2",
"qunit": "^2.18.0",
"rollup": "^2.70.1",
"qunit": "^2.19.1",
"rollup": "^2.72.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-terser": "^7.0.2"
}
Expand Down

0 comments on commit baaf6b0

Please sign in to comment.