Skip to content

Commit

Permalink
test: verify typescript usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Jan 17, 2024
1 parent e13dc95 commit 83fb9eb
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 1 deletion.
64 changes: 64 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
"devDependencies": {
"@rollup/plugin-node-resolve": "^14.1.0",
"@types/mocha": "^10.0.1",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^3.2.12",
"chai": "^4.3.4",
"cpx": "^1.5.0",
"eslint": "^8.28.0",
Expand Down
19 changes: 19 additions & 0 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { expect } from 'chai';

import {
flatten
} from '../lib/index.js';


describe('min-dash', function() {

it('should work', function() {

// given
const arr = [ [ 'A', 'B', 'C' ], 'B' ];

// when
expect(flatten(arr)).to.eql(arr);
});

});
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"include": [
"test/*.js"
"test/*.js",
"test/*.ts"
],
"compilerOptions": {
"strict": true,
Expand Down

0 comments on commit 83fb9eb

Please sign in to comment.