Remove @lodash
parent
f888b96c7a
commit
5fa50505e4
|
@ -3,7 +3,6 @@
|
||||||
// Public module from npm
|
// Public module from npm
|
||||||
import { expect } from "chai";
|
import { expect } from "chai";
|
||||||
import dotenv from "dotenv";
|
import dotenv from "dotenv";
|
||||||
import { isEqual } from "lodash";
|
|
||||||
|
|
||||||
// Modules from file
|
// Modules from file
|
||||||
import { login, PrefixParser } from "../../src/index";
|
import { login, PrefixParser } from "../../src/index";
|
||||||
|
@ -28,6 +27,8 @@ export function suite(): void {
|
||||||
// Create a new parser
|
// Create a new parser
|
||||||
const parser = new PrefixParser();
|
const parser = new PrefixParser();
|
||||||
|
|
||||||
|
// Test values
|
||||||
|
const testIDs = [103, 225, 44, 13, 2, 7, 22];
|
||||||
const testPrefixes = [
|
const testPrefixes = [
|
||||||
"corruption",
|
"corruption",
|
||||||
"pregnancy",
|
"pregnancy",
|
||||||
|
@ -37,12 +38,13 @@ export function suite(): void {
|
||||||
"Ren'Py",
|
"Ren'Py",
|
||||||
"Abandoned"
|
"Abandoned"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Parse values
|
||||||
const ids = parser.prefixesToIDs(testPrefixes);
|
const ids = parser.prefixesToIDs(testPrefixes);
|
||||||
const tags = parser.idsToPrefixes(ids);
|
const tags = parser.idsToPrefixes(ids);
|
||||||
|
|
||||||
const tagsEquality = isEqual(testPrefixes, tags);
|
// Assert equality
|
||||||
expect(tagsEquality, "The tags must be the same").to.be.true;
|
expect(testPrefixes).to.be.deep.equal(tags, "The tags must be the same");
|
||||||
const idsEquality = isEqual([103, 225, 44, 13, 2, 7, 22], ids);
|
expect(testIDs).to.be.deep.equal(ids, "The IDs must be the same");
|
||||||
expect(idsEquality, "The IDs must be the same").to.be.true;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue