Skip to content

Commit 1995028

Browse files
Snuffleupaguspull[bot]
authored andcommitted
Prevent duplicate names in unit/integration tests
Having identical names for different test-cases may result in less helpful output, which we can avoid with the use of the ESLint Jasmine plugin. This patch enables the rules at the `branch` level, to limit the amount/scope of the changes slightly. (We could thus make this rule more strict in the future, if that's deemed useful.) Please refer to: - https://github.com/tlvince/eslint-plugin-jasmine/blob/master/docs/rules/no-spec-dupes.md - https://github.com/tlvince/eslint-plugin-jasmine/blob/master/docs/rules/no-suite-dupes.md
1 parent fd10719 commit 1995028

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

test/.eslintrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"jasmine/new-line-between-declarations": "off",
1111
"jasmine/no-focused-tests": "error",
1212
"jasmine/no-pending-tests": "off",
13-
"jasmine/no-spec-dupes": "off",
14-
"jasmine/no-suite-dupes": "off",
13+
"jasmine/no-spec-dupes": ["error", "branch"],
14+
"jasmine/no-suite-dupes": ["error", "branch"],
1515
"jasmine/prefer-jasmine-matcher": "off",
1616
"jasmine/prefer-toHaveBeenCalledWith": "off"
1717
}

test/integration/find_spec.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ describe("find bar", () => {
7272
);
7373
});
7474
});
75-
describe("highlight all", () => {
75+
76+
describe("highlight all (XFA)", () => {
7677
let pages;
7778

7879
beforeAll(async () => {

test/unit/scripting_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ describe("Scripting", function () {
999999
});
10001000
});
10011001

1002-
it("should format a date", async () => {
1002+
it("should format a date (cFormat)", async () => {
10031003
const refId = getId();
10041004
const data = {
10051005
objects: {

test/unit/xfa_parser_spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1021,7 +1021,7 @@ describe("XFAParser", function () {
10211021
).toBe("SW1");
10221022
});
10231023

1024-
it("should make basic binding with extra subform", function () {
1024+
it("should make basic binding with extra subform (consumeData)", function () {
10251025
const xml = `
10261026
<?xml version="1.0"?>
10271027
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">

0 commit comments

Comments
 (0)