diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 326e68f..a868e32 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,4 +33,4 @@ jobs: run: pnpm install && npx playwright install - name: Run Test - run: pnpm run build + run: pnpm run build && pnpm run test diff --git a/package.json b/package.json index 70be30e..723117e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "lint": "biome check .", "lint:write": "biome check . --write", "prepare": "simple-git-hooks && npm run build", - "test": "playwright test", + "test": "node test/index.js", "bump": "npx bumpp" }, "simple-git-hooks": { diff --git a/test/index.js b/test/index.js new file mode 100644 index 0000000..310626e --- /dev/null +++ b/test/index.js @@ -0,0 +1,17 @@ +import assert from 'node:assert'; +import test from 'node:test'; +import { + checkCancel, + create, + multiselect, + select, + text, +} from '../dist/index.js'; + +test('should export public APIs', () => { + assert.deepStrictEqual(typeof checkCancel, 'function'); + assert.deepStrictEqual(typeof create, 'function'); + assert.deepStrictEqual(typeof multiselect, 'function'); + assert.deepStrictEqual(typeof select, 'function'); + assert.deepStrictEqual(typeof text, 'function'); +});