test: port spec-es6 tests to vitest

This commit is contained in:
Panagiotis Papadopoulos
2025-01-12 23:42:46 +01:00
parent 325a3b6c83
commit 3f584af171
3 changed files with 8 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
import { expect, describe, it } from "vitest";
import sanitizeAttributeName from "../src/services/sanitize_attribute_name";
import { describe, it, execute, expect } from "./mini_test";
// fn value, expected value
const testCases: [fnValue: string, expectedValue: string][] = [
@@ -31,9 +31,7 @@ describe("sanitizeAttributeName unit tests", () => {
return it(`'${testCase[0]}' should return '${testCase[1]}'`, () => {
const [value, expected] = testCase;
const actual = sanitizeAttributeName(value);
expect(actual).toEqual(expected);
expect(actual).toStrictEqual(expected);
});
});
});
execute();
});