-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from krutoo/refactoring
refactor
- Loading branch information
Showing
7 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ name: Publish Node.js Package | |
|
||
on: | ||
release: | ||
types: [created] | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [$default-branch] | ||
|
||
pull_request: | ||
branches: [$default-branch] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Unit tests | ||
run: | | ||
npm ci | ||
npm run check | ||
- name: Package build | ||
run: | | ||
npm run build | ||
npm pack | ||
- name: Package tests | ||
working-directory: ./tests | ||
run: | | ||
npm run preparing | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
dist | ||
node_modules | ||
.DS_Store | ||
.tsimp | ||
.tsimp | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import assert from 'node:assert'; | ||
import { createExplorer, createPathfinder, createPRNG, Dungeon } from 'rglk'; | ||
|
||
assert.strictEqual('function' === typeof createExplorer, true); | ||
assert.strictEqual('function' === typeof createPathfinder, true); | ||
assert.strictEqual('function' === typeof createPRNG, true); | ||
assert.strictEqual('function' === typeof Dungeon, true); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "rglk-tests", | ||
"type": "module", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"preparing": "npm i --no-save ../rglk-0.0.0.tgz", | ||
"test": "node index.js" | ||
} | ||
} |