From 8a5a056ced7e52f63c0062c022452848d05733ff Mon Sep 17 00:00:00 2001 From: Francesco Trotta Date: Sat, 23 Nov 2024 06:37:40 +0100 Subject: [PATCH] license test --- test/license.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/license.js diff --git a/test/license.js b/test/license.js new file mode 100644 index 0000000..6b39442 --- /dev/null +++ b/test/license.js @@ -0,0 +1,16 @@ +import assert from 'node:assert/strict'; +import { readFile } from 'node:fs/promises'; +import eslintDirURL from '../lib/default-eslint-dir-url.js'; + +it +( + 'ESLint License', + async () => + { + const actualURL = new URL('../ESLint License.txt', import.meta.url); + const expectedURL = new URL('./LICENSE', eslintDirURL); + const [actual, expected] = + await Promise.all([readFile(actualURL), readFile(expectedURL)]); + assert.deepEqual(actual, expected); + }, +);