Skip to content

Commit 6e7aeee

Browse files
committed
node-test-runner
1 parent f2220d6 commit 6e7aeee

24 files changed

+457
-152
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [ubuntu-latest, windows-latest, macos-latest]
19-
node-version: [14.x, 16.x, 18.x, 20.x]
19+
node-version: [18.x, 20.x, 22.x]
2020

2121
runs-on: ${{ matrix.os }}
2222

@@ -30,6 +30,18 @@ jobs:
3030
- run: npm run build --if-present
3131
- run: npm test
3232

33+
- name: test22
34+
if: matrix['node-version'] == '22.x'
35+
run: npm run test22
36+
37+
- name: test
38+
if: matrix['node-version'] == '20.x' || matrix['node-version'] == '=18.x'
39+
run: npm run test
40+
41+
- name: test-cov
42+
if: matrix['node-version'] == '22.x' && matrix['os'] == 'ubuntu-latest'
43+
run: npm run test-cov
44+
3345
- name: Coveralls
3446
uses: coverallsapp/github-action@main
3547
with:

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,30 @@ Load partial values from multiple sources, such as other files.
1515

1616

1717

18+
## Basic Example
19+
20+
21+
```yml
22+
# file: foo.jsonic
23+
a:1
24+
```
25+
26+
```ts
27+
import { Jsonic } from '@jsonic/jsonic-next'
28+
import { MultiSource } from '@jsonic/multisource'
29+
import { makeFileResolver } from '@jsonic/multisource/resolver/file'
30+
31+
let j = Jsonic.make().use(MultiSource, {
32+
resolver: makeFileResolver(),
33+
})
34+
35+
const out = j('@"foo.jsonic" b:2')
36+
// out === { a:1, b:2 }
37+
38+
```
39+
40+
41+
1842
<!--START:options-->
1943
## Options
2044
* _implictExt_

dist-test/multisource.test.js

Lines changed: 223 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)