Skip to content

Commit c2d215d

Browse files
committed
test scaffolding
1 parent f5644cc commit c2d215d

5 files changed

Lines changed: 15 additions & 36 deletions

File tree

.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
"node": true,
88
"worker": true
99
},
10+
"globals": {
11+
"chai": "readonly"
12+
},
1013
"extends": "eslint:recommended",
1114
"parserOptions": {
1215
"ecmaVersion": 2019,

test/index-dist.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
mocha.checkLeaks();
1818
</script>
1919

20-
<script src="../src/fslib.js"></script>
20+
<script src="../dist/fslib.js"></script>
21+
<script src="test.array.js"></script>
2122
<script class="mocha-exec">
2223
mocha.run();
2324
</script>

test/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
</script>
1919

2020
<script src="../src/fslib.js"></script>
21+
<script src="test.array.js"></script>
2122
<script class="mocha-exec">
2223
mocha.run();
2324
</script>

test/index.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

test/test.array.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
let expect = chai.expect;
2+
describe('Array', function () {
3+
describe('#indexOf()', function () {
4+
it('should return -1 when the value is not present', function () {
5+
expect([1, 2, 3].indexOf(5)).to.equal(-1);
6+
expect([1, 2, 3].indexOf(0)).to.equal(-1);
7+
});
8+
});
9+
});

0 commit comments

Comments
 (0)