diff --git a/package.json b/package.json index 5a1c264..5038ad2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "prepare": "pnpm run build && tsc", "build": "jison ./parser.jison -o src/parser.js", "lint": "eslint . && tsc", - "test": "uvu test" + "test": "node --test" }, "author": "Andy Jansson", "license": "MIT", @@ -39,8 +39,7 @@ "jison-gho": "^0.6.1-216", "postcss": "^8.4.38", "prettier": "^3.2.5", - "typescript": "~5.4.5", - "uvu": "^0.5.6" + "typescript": "~5.4.5" }, "dependencies": { "postcss-selector-parser": "^6.0.16", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16aef0d..0b2ea26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,9 +36,6 @@ importers: typescript: specifier: ~5.4.5 version: 5.4.5 - uvu: - specifier: ^0.5.6 - version: 0.5.6 packages: @@ -243,14 +240,6 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - - diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} - engines: {node: '>=0.3.1'} - escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -428,10 +417,6 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - lcid@1.0.0: resolution: {integrity: sha512-YiGkH6EnGrDGqLMITnGjXtGmNtjoXw9SVUzcaos8RBi7Ps0VBylkq+vOcY9QE5poLasPCR849ucFUkl0UzUyOw==} engines: {node: '>=0.10.0'} @@ -465,10 +450,6 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} @@ -599,10 +580,6 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} @@ -690,11 +667,6 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - uvu@0.5.6: - resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} - engines: {node: '>=8'} - hasBin: true - which-module@2.0.1: resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} @@ -914,10 +886,6 @@ snapshots: deep-is@0.1.4: {} - dequal@2.0.3: {} - - diff@5.2.0: {} - escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} @@ -1099,8 +1067,6 @@ snapshots: dependencies: json-buffer: 3.0.1 - kleur@4.1.5: {} - lcid@1.0.0: dependencies: invert-kv: 1.0.0 @@ -1136,8 +1102,6 @@ snapshots: dependencies: brace-expansion: 1.1.11 - mri@1.2.0: {} - ms@2.1.2: {} nanoid@3.3.7: {} @@ -1238,10 +1202,6 @@ snapshots: dependencies: queue-microtask: 1.2.3 - sade@1.8.1: - dependencies: - mri: 1.2.0 - set-blocking@2.0.0: {} shebang-command@1.2.0: @@ -1313,13 +1273,6 @@ snapshots: util-deprecate@1.0.2: {} - uvu@0.5.6: - dependencies: - dequal: 2.0.3 - diff: 5.2.0 - kleur: 4.1.5 - sade: 1.8.1 - which-module@2.0.1: {} which@1.3.1: diff --git a/test/convertUnit.js b/test/convertUnit.js index 3b10979..b7342d5 100644 --- a/test/convertUnit.js +++ b/test/convertUnit.js @@ -1,6 +1,6 @@ 'use strict'; -const { test } = require('uvu'); -const assert = require('uvu/assert'); +const { test } = require('node:test'); +const assert = require('node:assert/strict'); const convertUnit = require('../src/lib/convertUnit.js'); @@ -96,7 +96,7 @@ test('valid conversions', () => { const expected = e[2]; const targetUnit = e[3]; - assert.is( + assert.strictEqual( convertUnit(value, unit, targetUnit), expected, unit + ' -> ' + targetUnit @@ -406,7 +406,7 @@ test('precision', () => { const expected = e[2]; const targetUnit = e[3]; - assert.is( + assert.strictEqual( convertUnit(value, unit, targetUnit, precision), expected, unit + ' -> ' + targetUnit @@ -415,7 +415,6 @@ test('precision', () => { }); test('falsey precision', () => { - assert.is(convertUnit(10, 'px', 'cm', false), 0.26458333333333334); + assert.strictEqual(convertUnit(10, 'px', 'cm', false), 0.26458333333333334); }); -test.run(); diff --git a/test/index.js b/test/index.js index 13d688e..d14dc4b 100644 --- a/test/index.js +++ b/test/index.js @@ -1,6 +1,6 @@ 'use strict'; -const { test } = require('uvu'); -const assert = require('uvu/assert'); +const { test } = require('node:test'); +const assert = require('node:assert/strict'); const postcss = require('postcss'); const reduceCalc = require('../src/index.js'); @@ -16,7 +16,7 @@ function testValue(fixture, expected, opts = {}) { fixture, postcssOpts ); - assert.is(result.css, expected); + assert.strictEqual(result.css, expected); }; } @@ -26,7 +26,7 @@ function testCss(fixture, expected, opts = {}) { fixture, postcssOpts ); - assert.is(result.css, expected); + assert.strictEqual(result.css, expected); }; } @@ -40,8 +40,8 @@ function testThrows(fixture, expected, warning, opts = {}) { postcssOpts ); const warnings = result.warnings(); - assert.is(result.css, expected); - assert.is(warnings[0].text, warning); + assert.strictEqual(result.css, expected); + assert.strictEqual(warnings[0].text, warning); }; } @@ -910,5 +910,3 @@ test( 'Lexical error on line 1: Unrecognized text.\n\n Erroneous area:\n1: 10pc + unknown\n^.........^' ) ); - -test.run();