Skip to content

Instantly share code, notes, and snippets.

@Offirmo
Last active February 9, 2023 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Offirmo/0dc6a552e59e6347bc4b096874d3ab3b to your computer and use it in GitHub Desktop.
Save Offirmo/0dc6a552e59e6347bc4b096874d3ab3b to your computer and use it in GitHub Desktop.
Unit Test in TypeScript
import { expect } from 'chai'
import {
LIB
} from '../index.js'
describe(`${LIB}`, function () {
describe('plugins', function () {
describe(`foo()`, function () {
it('should work', () => {
// TODO
})
})
})
})
"scripts": {
"test": "mocha --bail --config ./node_modules/@offirmo/unit-test-toolbox/mocharc.json ./node_modules/@offirmo/unit-test-toolbox/mocha-chai-init-node.cjs 'dist/src.es2022.esm/**/*spec.js'",
},
"devDependencies": {
"@offirmo/unit-test-toolbox": "^8",
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment