Skip to content

Commit

Permalink
feat: add example node:test
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed May 11, 2023
1 parent d4df061 commit 62aee3f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
15 changes: 14 additions & 1 deletion package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
"organization": true
},
"devDependencies": {
"@linzjs/style": "^4.0.0"
"@linzjs/style": "^4.0.0",
"@types/node": "^20.1.2"
},
"scripts": {
"build": "tsc",
"lint": "npx eslint . --ignore-path .gitignore",
"test": "echo 'No tests yet'"
"test": "node --test"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com",
Expand Down
9 changes: 9 additions & 0 deletions src/__test__/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import assert from 'node:assert';
import { describe, it } from 'node:test';
import { helloWorld } from '../index.js';

describe('helloWorld', () => {
it('should respond with hello world', () => {
assert.equal(helloWorld('test'), 'hello world! test');
});
});

0 comments on commit 62aee3f

Please sign in to comment.