Skip to content

Commit

Permalink
Add main.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sebilm committed Dec 19, 2023
1 parent d6dd6a6 commit 493d5e2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/main.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* This is a dummy TypeScript test file using chai and mocha
*
* It's automatically excluded from npm and its build output is excluded from both git and npm.
* It is advised to test all your modules with accompanying *.test.ts-files
*/

import { expect } from 'chai';
// import { functionToTest } from "./moduleToTest";

describe('module to test => function to test', () => {
// initializing logic
const expected = 5;

it(`should return ${expected}`, () => {
const result = 5;
// assign result a value from functionToTest
expect(result).to.equal(expected);
// or using the should() syntax
result.should.equal(expected);
});
// ... more tests => it
});

// ... more test suites => describe

0 comments on commit 493d5e2

Please sign in to comment.