diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 8c66fae..99804c4 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -4,8 +4,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 'lts/*' - run: yarn install diff --git a/.jshintrc b/.jshintrc index 2b4903b..9bf58ac 100644 --- a/.jshintrc +++ b/.jshintrc @@ -4,7 +4,6 @@ "eqnull": true, "immed": true, "latedef": "nofunc", - "mocha" : true, "newcap": true, "noarg": true, "node": true, diff --git a/Makefile b/Makefile index 8be0931..8e9b769 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,6 @@ lint: ./node_modules/.bin/jshint *.js lib test test: - ./node_modules/.bin/mocha --recursive --require should + node --require should --test .PHONY: check lint test diff --git a/Readme.md b/Readme.md index 0411ff2..55fc9e3 100644 --- a/Readme.md +++ b/Readme.md @@ -29,7 +29,7 @@ MIT © [code42day](https://code42day.com) [npm-image]: https://img.shields.io/npm/v/@furkot/export-ical [npm-url]: https://npmjs.org/package/@furkot/export-ical -[build-image]: https://img.shields.io/github/workflow/status/furkot/export-ical/check +[build-image]: https://img.shields.io/github/actions/workflow/status/furkot/export-ical/check.yaml?branch=main [build-url]: https://github.com/furkot/export-ical/actions/workflows/check.yaml [deps-image]: https://img.shields.io/librariesio/release/npm/@furkot/export-ical diff --git a/package.json b/package.json index 4358387..1396376 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,10 @@ "email": "pirxpilot@code42day.com", "url": "https://code42day.com" }, - "repository": "furkot/export-ical", + "repository": { + "type": "git", + "url": "git+https://github.com/furkot/export-ical.git" + }, "license": "MIT", "keywords": [ "furkot-ical", @@ -20,11 +23,10 @@ "iCal" ], "dependencies": { - "uuid": "^8.3.2" + "uuid": "~9" }, "devDependencies": { - "jshint": "~2", - "mocha": "~10", + "@pirxpilot/jshint": "~3", "should": "~13" }, "scripts": { @@ -34,4 +36,4 @@ "index.js", "lib" ] -} \ No newline at end of file +} diff --git a/test/ical.js b/test/ical.js index dba0215..37fd493 100644 --- a/test/ical.js +++ b/test/ical.js @@ -1,3 +1,4 @@ +const { describe, it } = require('node:test'); const ical = require('../'); const fs = require('fs'); @@ -25,7 +26,7 @@ function compareLines(actual, expected) { actual = actual.split('\r\n').filter(notStamp); expected = expected.split('\r\n').filter(notStamp); - for(let i = 0; i < actual.length; i += 1) { + for (let i = 0; i < actual.length; i += 1) { actual[i].should.eql(expected[i], `line: ${i}`); } @@ -35,7 +36,7 @@ function compareLines(actual, expected) { describe('ical', function () { - it('simple trip', function() { + it('simple trip', function () { const t = require('./fixtures/simple-trip.json'); const generated = ical(t); const expected = readFileSync('fixtures/simple.ics'); @@ -43,7 +44,7 @@ describe('ical', function () { compareLines(generated, expected); }); - it('multi trip', function() { + it('multi trip', function () { const t = require('./fixtures/multi-trip.json'); const generated = ical(t); const expected = readFileSync('fixtures/multi.ics'); diff --git a/test/property.js b/test/property.js index 45da606..a44ba44 100644 --- a/test/property.js +++ b/test/property.js @@ -1,3 +1,4 @@ +const { describe, it } = require('node:test'); const property = require('../lib/property'); /* global TextDecoder */ @@ -5,7 +6,7 @@ const decoder = new TextDecoder(); describe('property', function () { - it('short', function() { + it('short', function () { const p = property('abc', 'ąbć'); const { value, done } = p.next(); @@ -16,7 +17,7 @@ describe('property', function () { p.next().done.should.equal(true); }); - it('long', function() { + it('long', function () { const p = property('A', 'a'.repeat(100)); const values = Array.from(p); @@ -30,7 +31,7 @@ describe('property', function () { strings[1].should.equal(` ${'a'.repeat(27)}\r\n`); }); - it('very long', function() { + it('very long', function () { const p = property('A', 'a'.repeat(300)); const strings = Array.from(p).map(s => decoder.decode(s)); @@ -43,7 +44,7 @@ describe('property', function () { strings[4].should.equal(` ${'a'.repeat(5)}\r\n`); }); - it('long with multibyte', function() { + it('long with multibyte', function () { const p = property('A', 'ą'.repeat(100)); const strings = Array.from(p).map(s => decoder.decode(s)); @@ -54,7 +55,7 @@ describe('property', function () { strings[2].should.equal(` ${'ą'.repeat(100 - 37 - 36)}\r\n`); }); - it('long with emoji', function() { + it('long with emoji', function () { const p = property('A', '🌻'.repeat(100)); const strings = Array.from(p).map(s => decoder.decode(s));