mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Linter config lints test directory (#99)
Modify eslint config to lint ./test/
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
const { quality } = require('../dist/coretypes')
|
||||
const { quality } = require("../dist/coretypes");
|
||||
|
||||
describe('Quality encode/decode', function () {
|
||||
describe("Quality encode/decode", function () {
|
||||
const bookDirectory =
|
||||
'4627DFFCFF8B5A265EDBD8AE8C14A52325DBFEDAF4F5C32E5D06F4C3362FE1D0'
|
||||
const expectedQuality = '195796912.5171664'
|
||||
test('can decode', function () {
|
||||
const decimal = quality.decode(bookDirectory)
|
||||
expect(decimal.toString()).toBe(expectedQuality)
|
||||
})
|
||||
test('can encode', function () {
|
||||
const bytes = quality.encode(expectedQuality)
|
||||
expect(bytes.toString('hex').toUpperCase()).toBe(bookDirectory.slice(-16))
|
||||
})
|
||||
})
|
||||
"4627DFFCFF8B5A265EDBD8AE8C14A52325DBFEDAF4F5C32E5D06F4C3362FE1D0";
|
||||
const expectedQuality = "195796912.5171664";
|
||||
test("can decode", function () {
|
||||
const decimal = quality.decode(bookDirectory);
|
||||
expect(decimal.toString()).toBe(expectedQuality);
|
||||
});
|
||||
test("can encode", function () {
|
||||
const bytes = quality.encode(expectedQuality);
|
||||
expect(bytes.toString("hex").toUpperCase()).toBe(bookDirectory.slice(-16));
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user