Skip to content

Commit

Permalink
chore: add simple unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkli committed Jan 21, 2025
1 parent 0faeedb commit ba4c1d9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .nycrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"reporter": ["lcov", "text", "text-summary"],
"check-coverage": true,
"check-coverage": false,
"lines": 100,
"branches": 100,
"statements": 100
Expand Down
7 changes: 7 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
"include": ["test/**/*.js"],
"javascript": {
"globals": ["describe", "it"]
},
"linter": {
"rules": {
"style": {
"noDoneCallback": "off"
}
}
}
},
{
Expand Down
9 changes: 7 additions & 2 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@
*/

import assert from 'node:assert/strict';
import { exec } from 'node:child_process';

describe('index', () => {
it('is true (placeholder test)', () => {
assert.ok(true);
it('edgly -h', (done) => {
exec('node src/index.js -h', (err, stdout, _stderr) => {
assert.ok(!err, err?.message);
assert.ok(stdout.includes('Boost Fastly™️ VCL service development'));
done();
});
});
});

0 comments on commit ba4c1d9

Please sign in to comment.