@japa/runner 2.0.5 → 2.0.8

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/build/index.js CHANGED
@@ -140,6 +140,7 @@ function isSuiteAllowed(name, filters) {
140
140
  */
141
141
  function configure(options) {
142
142
  const defaultOptions = {
143
+ cwd: process.cwd(),
143
144
  files: [],
144
145
  suites: [],
145
146
  plugins: [],
@@ -206,11 +207,11 @@ test.group = function (title, callback) {
206
207
  * Set filename
207
208
  */
208
209
  activeGroup.options.meta.fileName = recentlyImportedFile;
209
- callback(activeGroup);
210
210
  /**
211
211
  * Add group to the default suite
212
212
  */
213
213
  activeSuite.add(activeGroup);
214
+ callback(activeGroup);
214
215
  activeGroup = undefined;
215
216
  };
216
217
  /**
@@ -219,7 +220,7 @@ test.group = function (title, callback) {
219
220
  */
220
221
  async function collectFiles(files) {
221
222
  if (Array.isArray(files) || typeof files === 'string') {
222
- return await (0, fast_glob_1.default)(files, { absolute: true, onlyFiles: true });
223
+ return await (0, fast_glob_1.default)(files, { absolute: true, onlyFiles: true, cwd: runnerOptions.cwd });
223
224
  }
224
225
  else if (typeof files === 'function') {
225
226
  return await files();
@@ -395,6 +396,7 @@ function processCliArgs(argv) {
395
396
  };
396
397
  processAsString(parsed, 'tags', (tags) => (config.filters.tags = tags));
397
398
  processAsString(parsed, 'ignoreTags', (tags) => {
399
+ config.filters.tags = config.filters.tags || [];
398
400
  tags.forEach((tag) => config.filters.tags.push(`!${tag}`));
399
401
  });
400
402
  processAsString(parsed, 'groups', (groups) => (config.filters.groups = groups));
@@ -34,6 +34,7 @@ export declare type RunnerHooks = {
34
34
  * Base configuration options
35
35
  */
36
36
  export declare type BaseConfig = {
37
+ cwd?: string;
37
38
  timeout?: number;
38
39
  plugins?: PluginFn[];
39
40
  filters?: Filters;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@japa/runner",
3
- "version": "2.0.5",
3
+ "version": "2.0.8",
4
4
  "description": "Runner for Japa testing framework",
5
5
  "main": "build/index.js",
6
6
  "files": [
@@ -35,22 +35,22 @@
35
35
  "license": "MIT",
36
36
  "devDependencies": {
37
37
  "@adonisjs/mrm-preset": "^5.0.3",
38
- "@adonisjs/require-ts": "^2.0.10",
39
- "@types/node": "^17.0.22",
38
+ "@adonisjs/require-ts": "^2.0.11",
39
+ "@types/node": "^17.0.34",
40
40
  "commitizen": "^4.2.4",
41
41
  "cz-conventional-changelog": "^3.3.0",
42
42
  "del-cli": "^4.0.1",
43
- "eslint": "^8.11.0",
43
+ "eslint": "^8.15.0",
44
44
  "eslint-config-prettier": "^8.5.0",
45
45
  "eslint-plugin-adonis": "^2.1.0",
46
46
  "eslint-plugin-prettier": "^4.0.0",
47
- "github-label-sync": "^2.0.2",
48
- "husky": "^7.0.4",
47
+ "github-label-sync": "^2.2.0",
48
+ "husky": "^8.0.1",
49
49
  "japa": "^4.0.0",
50
50
  "mrm": "^4.0.0",
51
51
  "np": "^7.6.1",
52
- "prettier": "^2.6.0",
53
- "typescript": "^4.6.2"
52
+ "prettier": "^2.6.2",
53
+ "typescript": "^4.6.4"
54
54
  },
55
55
  "mrmConfig": {
56
56
  "core": false,
@@ -105,8 +105,8 @@
105
105
  "anyBranch": false
106
106
  },
107
107
  "dependencies": {
108
- "@japa/core": "^6.0.2",
109
- "@japa/errors-printer": "^1.3.5",
108
+ "@japa/core": "^6.0.5",
109
+ "@japa/errors-printer": "^1.3.8",
110
110
  "@poppinss/hooks": "^6.0.2-0",
111
111
  "fast-glob": "^3.2.11",
112
112
  "getopts": "^2.3.0",