@spscommerce/e2e-core 2.5.0 → 2.5.1
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/eslint.config.mjs +38 -0
- package/lib/matchersSetup.js +1 -24
- package/lib/matchersSetup.js.map +1 -1
- package/package.json +2 -2
- package/src/matchersSetup.ts +1 -1
- package/eslint.config.js +0 -53
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import {fileURLToPath} from 'node:url';
|
|
4
|
+
import {defineConfig, globalIgnores} from 'eslint/config';
|
|
5
|
+
|
|
6
|
+
import tsParser from '@typescript-eslint/parser';
|
|
7
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
8
|
+
import js from '@eslint/js';
|
|
9
|
+
import {FlatCompat} from '@eslint/eslintrc';
|
|
10
|
+
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = path.dirname(__filename);
|
|
13
|
+
const compat = new FlatCompat({
|
|
14
|
+
baseDirectory: __dirname, recommendedConfig: js.configs.recommended, allConfig: js.configs.all
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default defineConfig([globalIgnores(["node_modules/*", "lib/*"]), {
|
|
18
|
+
languageOptions: {
|
|
19
|
+
globals: {
|
|
20
|
+
...globals.browser, ...globals.amd, ...globals.node,
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
parser: tsParser, "ecmaVersion": 12, "sourceType": "module", parserOptions: {},
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
|
27
|
+
|
|
28
|
+
plugins: {
|
|
29
|
+
"@typescript-eslint": typescriptEslint,
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
"rules": {
|
|
33
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
34
|
+
"@typescript-eslint/no-var-requires": "off",
|
|
35
|
+
"@typescript-eslint/no-require-imports": "off",
|
|
36
|
+
"no-empty-pattern": "off"
|
|
37
|
+
},
|
|
38
|
+
}]);
|
package/lib/matchersSetup.js
CHANGED
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
6
|
const test_1 = require("@playwright/test");
|
|
30
|
-
const matchers = __importStar(require("jest-extended"));
|
|
31
7
|
const withMessage_js_1 = __importDefault(require("jest-expect-message/dist/withMessage.js"));
|
|
32
8
|
const expect = (0, withMessage_js_1.default)(test_1.test.expect);
|
|
9
|
+
const matchers = require('jest-extended');
|
|
33
10
|
expect.extend(matchers);
|
|
34
11
|
exports.default = expect;
|
|
35
12
|
//# sourceMappingURL=matchersSetup.js.map
|
package/lib/matchersSetup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchersSetup.js","sourceRoot":"","sources":["../src/matchersSetup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"matchersSetup.js","sourceRoot":"","sources":["../src/matchersSetup.ts"],"names":[],"mappings":";;;;;AAAA,2CAAwC;AACxC,6FAAkE;AAElE,MAAM,MAAM,GAAG,IAAA,wBAAW,EAAC,WAAI,CAAC,MAAM,CAAC,CAAC;AAExC,MAAM,QAAQ,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAC1C,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAExB,kBAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spscommerce/e2e-core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.1",
|
|
4
4
|
"description": "An automation test framework which is based on Playwright.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dotenv": "16.6.1",
|
|
33
33
|
"eslint": "9.39.1",
|
|
34
34
|
"jest-expect-message": "1.1.3",
|
|
35
|
-
"jest-extended": "
|
|
35
|
+
"jest-extended": "1.2.1",
|
|
36
36
|
"typescript": "4.9.5"
|
|
37
37
|
},
|
|
38
38
|
"packageManager": "yarn@4.4.0+sha512.91d93b445d9284e7ed52931369bc89a663414e5582d00eea45c67ddc459a2582919eece27c412d6ffd1bd0793ff35399381cb229326b961798ce4f4cc60ddfdb"
|
package/src/matchersSetup.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { test } from '@playwright/test';
|
|
2
|
-
import * as matchers from 'jest-extended';
|
|
3
2
|
import withMessage from 'jest-expect-message/dist/withMessage.js';
|
|
4
3
|
|
|
5
4
|
const expect = withMessage(test.expect);
|
|
6
5
|
|
|
6
|
+
const matchers = require('jest-extended');
|
|
7
7
|
expect.extend(matchers);
|
|
8
8
|
|
|
9
9
|
export default expect;
|
package/eslint.config.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
const {
|
|
2
|
-
defineConfig, globalIgnores
|
|
3
|
-
} = require("eslint/config");
|
|
4
|
-
|
|
5
|
-
const globals = require("globals");
|
|
6
|
-
const tsParser = require("@typescript-eslint/parser");
|
|
7
|
-
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
|
|
8
|
-
const js = require("@eslint/js");
|
|
9
|
-
|
|
10
|
-
const {
|
|
11
|
-
FlatCompat,
|
|
12
|
-
} = require("@eslint/eslintrc");
|
|
13
|
-
|
|
14
|
-
const compat = new FlatCompat({
|
|
15
|
-
baseDirectory: __dirname,
|
|
16
|
-
recommendedConfig: js.configs.recommended,
|
|
17
|
-
allConfig: js.configs.all
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
module.exports = defineConfig([
|
|
21
|
-
globalIgnores([
|
|
22
|
-
"node_modules/*",
|
|
23
|
-
"lib/*",
|
|
24
|
-
"eslint.config.js"
|
|
25
|
-
]),
|
|
26
|
-
{
|
|
27
|
-
languageOptions: {
|
|
28
|
-
globals: {
|
|
29
|
-
...globals.browser,
|
|
30
|
-
...globals.amd,
|
|
31
|
-
...globals.node,
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
parser: tsParser,
|
|
35
|
-
"ecmaVersion": 12,
|
|
36
|
-
"sourceType": "module",
|
|
37
|
-
parserOptions: {},
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),
|
|
41
|
-
|
|
42
|
-
plugins: {
|
|
43
|
-
"@typescript-eslint": typescriptEslint,
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
"rules": {
|
|
47
|
-
"@typescript-eslint/no-explicit-any": "off",
|
|
48
|
-
"@typescript-eslint/no-var-requires": "off",
|
|
49
|
-
"@typescript-eslint/no-require-imports": "off",
|
|
50
|
-
"no-empty-pattern": "off"
|
|
51
|
-
},
|
|
52
|
-
}
|
|
53
|
-
]);
|