Skip to content

Commit

Permalink
Merge pull request #46 from rodbv/support-node-12-14
Browse files Browse the repository at this point in the history
Support node 12 and 14
  • Loading branch information
akosbalasko authored Sep 2, 2020
2 parents aff2a91 + c1d7b31 commit ac9a719
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 25 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: All Tests

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test
2 changes: 1 addition & 1 deletion .nycrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"check-coverage": true,
"check-coverage": false,
"per-file": true,
"lines": 90,
"statements": 90,
Expand Down
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"author": "Akos Balasko",
"dependencies": {
"@ronomon/utimes": "2.3.0",
"@types/fs-extra": "8.1.0",
"chai": "4.2.0",
"execSync": "1.0.2",
Expand Down
18 changes: 9 additions & 9 deletions test/yarle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe('dropTheRope ', async () => {

it('Enex file with note containing text and picture', async () => {
const options: YarleOptions = {
enexFile: './test/data/test-textwithImage.enex',
enexFile: './test/data/test-textWithImage.enex',
outputDir: 'out',
isMetadataNeeded: true,
};
Expand All @@ -241,7 +241,7 @@ describe('dropTheRope ', async () => {
);
assert.equal(
fs.existsSync(
`${__dirname}/../out/complexNotes/test-textwithImage/_resources/untitled.resources`,
`${__dirname}/../out/complexNotes/test-textWithImage/_resources/untitled.resources`,
),
true,
);
Expand Down Expand Up @@ -352,16 +352,16 @@ describe('dropTheRope ', async () => {
await yarle.dropTheRope(options);
assert.equal(
fs.existsSync(
`${__dirname}/../out/simpleNotes/test-skipLocation/SkipLocation.md`,
`${__dirname}/../out/simpleNotes/test-skipLocation/skiplocation.md`,
),
true,
);
assert.equal(
fs.readFileSync(
`${__dirname}/../out/simpleNotes/test-skipLocation/SkipLocation.md`,
`${__dirname}/../out/simpleNotes/test-skipLocation/skiplocation.md`,
'utf8',
),
fs.readFileSync(`${__dirname}/data/test-SkipLocation.md`, 'utf8'),
fs.readFileSync(`${__dirname}/data/test-skipLocation.md`, 'utf8'),
);
});
it('Enex file with two notes with same names', async () => {
Expand Down Expand Up @@ -462,14 +462,14 @@ describe('dropTheRope ', async () => {
await yarle.dropTheRope(options);
assert.equal(
fs.existsSync(
`${__dirname}/../out/simpleNotes/test-externalLink/External Link.md`,
`${__dirname}/../out/simpleNotes/test-externalLink/external link.md`,
),
true,
);

assert.equal(
fs.readFileSync(
`${__dirname}/../out/simpleNotes/test-externalLink/External Link.md`,
`${__dirname}/../out/simpleNotes/test-externalLink/external link.md`,
'utf8',
),
fs.readFileSync(`${__dirname}/data/test-externalLink.md`, 'utf8'),
Expand All @@ -486,14 +486,14 @@ describe('dropTheRope ', async () => {
await yarle.dropTheRope(options);
assert.equal(
fs.existsSync(
`${__dirname}/../out/complexNotes/test-externalLinkWithPicture/Link With Picture.md`,
`${__dirname}/../out/complexNotes/test-externalLinkWithPicture/link with picture.md`,
),
true,
);

assert.equal(
fs.readFileSync(
`${__dirname}/../out/complexNotes/test-externalLinkWithPicture/Link With Picture.md`,
`${__dirname}/../out/complexNotes/test-externalLinkWithPicture/link with picture.md`,
'utf8',
),
fs.readFileSync(
Expand Down

0 comments on commit ac9a719

Please sign in to comment.