Skip to content

Commit

Permalink
Merge pull request #2 from poef/testrunner
Browse files Browse the repository at this point in the history
add github actions to run tests
  • Loading branch information
poef authored Apr 4, 2024
2 parents a006212 + 7c4fc06 commit 356f415
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Run tap tests

on:
- pull_request
# Allow manually triggering the workflow.
- workflow_dispatch

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install
- run: npm test

8 changes: 4 additions & 4 deletions test/oldm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ tap.test('two graphs merging', t => {
t.end()
})

tap.test('seperator', t => {
tap.test('separator', t => {
let turtle = `
@prefix : <#>.
@prefix schema: <http://schema.org/>.
Expand All @@ -88,7 +88,7 @@ tap.test('seperator', t => {
'schema':'https://schema.org/',
'vcard':'http://www.w3.org/2006/vcard/ns#'
},
seperator: ':'
separator: ':'
})
let data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me')
t.same(''+data['vcard:fn'], 'Auke van Slooten')
Expand All @@ -115,7 +115,7 @@ tap.test('xsdtypes', t => {
'schema':'https://schema.org/',
'vcard':'http://www.w3.org/2006/vcard/ns#'
},
// seperator: ':'
// separator: ':'
})
let data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me')
t.same(''+data.vcard$bday, '1972-09-20')
Expand All @@ -126,7 +126,7 @@ tap.test('xsdtypes', t => {
'schema':'https://schema.org/',
'vcard':'http://www.w3.org/2006/vcard/ns#'
},
seperator: ':'
separator: ':'
})
data = oldmParser.parse(turtle, 'https://auke.solidcommunity.net/profile/card#me')
t.same(''+data['vcard:bday'], '1972-09-20')
Expand Down

0 comments on commit 356f415

Please sign in to comment.