Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: small cleanups, github testing #59

Merged
merged 1 commit into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
run: echo "version=$(npx semantic-release --version)" >> "$GITHUB_OUTPUT"
- name: GitHub Release update
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
#if: startsWith(github.ref, 'refs/tags/')
with:
# body_path: ${{ github.workspace }}-CHANGELOG.txt
# note you'll typically need to create a personal access token
Expand Down
9 changes: 9 additions & 0 deletions src/nl/bsn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ describe('nl/bsn', () => {
expect(result).toEqual('1112.22.333');
});

test.each([
'001855013', // RSIN
'1112.22.333', // BSN
])('isValid', value => {
const result = validate(value);

expect(result.isValid).toEqual(true);
});

it('validate:1112.22.333', () => {
const result = validate('1112.22.333');

Expand Down
2 changes: 1 addition & 1 deletion src/nl/btw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const impl: Validator = {

const sum = weightedSum(a, {
weights: [9, 8, 7, 6, 5, 4, 3, 2, -1],
modulus: 10000,
modulus: 11,
});

if (sum % 11 !== 0 && !mod97base10Validate(`NL${a}${b}${c}`)) {
Expand Down