@systemfsoftware/oxlint-plugin-test-discipline 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @systemfsoftware/oxlint-plugin-test-discipline
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - The `contract` test suffix is retired. `test-suffix-outside-src` now reports a test file named with the `contract` suffix, and the behaviour-test rules (`behaviour-test-requires-gherkin`, `behaviour-one-feature-per-file`, `behaviour-exercises-use-case`, `no-pseudo-gherkin-unit-tests`) apply to the `integration` suffix alone. Rename a suite that drives a real medium to the `integration` suffix.
8
+
3
9
  ## 4.0.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.mjs CHANGED
@@ -81,6 +81,7 @@ const SANCTIONED_TEST_DIRS = /* @__PURE__ */ new Set(["tests"]);
81
81
  const NESTED_TEST_DIR = "__tests__";
82
82
  const TEST_TREE_DIRS = /* @__PURE__ */ new Set([...SANCTIONED_TEST_DIRS, NESTED_TEST_DIR]);
83
83
  const PROPERTY_SUFFIX = ".property.test.ts";
84
+ const INTEGRATION_SUFFIX = ".integration.test.ts";
84
85
  const DIFFERENTIAL_SUFFIX = ".differential.test.ts";
85
86
  /**
86
87
  * Forbidden outright. A schema's laws are generated, so a hand-written
@@ -152,7 +153,7 @@ const isInTestsImportScope = (filename) => {
152
153
  };
153
154
  const isInConfiguredTestDir = (filename, dirs) => directoriesOf(filename).some((segment) => dirs.includes(segment));
154
155
  const isTestFile = (basename) => TEST_BASENAME.test(basename);
155
- const isBehaviourBasename = (basename) => basename.endsWith(".integration.test.ts") || basename.endsWith(".contract.test.ts");
156
+ const isBehaviourBasename = (basename) => basename.endsWith(INTEGRATION_SUFFIX);
156
157
  const CELL_SUFFIX = /\.([^.]+)\.[cm]?tsx?$/;
157
158
  const cellOf = (basename) => CELL_SUFFIX.exec(basename)?.[1];
158
159
  //#endregion
@@ -3105,9 +3106,9 @@ const testFileOutsideTestsDir = defineRule({
3105
3106
  });
3106
3107
  //#endregion
3107
3108
  //#region src/rules/test-suffix-outside-src.config.ts
3108
- const UNSANCTIONED_SUFFIX_EXPECTED = "*.integration.test.ts, *.contract.test.ts, *.differential.test.ts, *.trace.test.ts, or *.conformance.test.ts";
3109
+ const UNSANCTIONED_SUFFIX_EXPECTED = "*.integration.test.ts, *.differential.test.ts, *.trace.test.ts, or *.conformance.test.ts";
3109
3110
  const UNSANCTIONED_SUFFIX_ACTUAL = "another test suffix outside src/";
3110
- const UNSANCTIONED_SUFFIX_FIX = "public surface -> *.integration.test.ts; real-oracle medium -> *.contract.test.ts (contract lane); parity -> *.differential.test.ts; span graph -> *.trace.test.ts; concurrent or stateful behaviour -> *.conformance.test.ts; pure-cell property -> in-source; restated literal -> delete";
3111
+ const UNSANCTIONED_SUFFIX_FIX = "public surface or real medium -> *.integration.test.ts; parity -> *.differential.test.ts; span graph -> *.trace.test.ts; concurrent or stateful behaviour -> *.conformance.test.ts; pure-cell property -> in-source; restated literal -> delete";
3111
3112
  //#endregion
3112
3113
  //#region src/rules/test-suffix-outside-src.ts
3113
3114
  const testSuffixOutsideSrc = defineRule({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@systemfsoftware/oxlint-plugin-test-discipline",
3
3
  "license": "Apache-2.0",
4
- "version": "4.0.1",
4
+ "version": "4.1.0",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",