biz-a-cli 2.3.67 → 2.3.68

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/bin/app.js CHANGED
@@ -136,6 +136,8 @@ Object
136
136
  jestCommand.push('--passWithNoTests')
137
137
  }
138
138
  }
139
+ process.chdir(workDir);
140
+
139
141
  const child = spawn('npx', jestCommand, { shell: true });
140
142
  child.stderr.on('data', data => output += data?.toString())
141
143
  child.on('close', async code => {
@@ -149,7 +151,6 @@ Object
149
151
  if ((code == 0) ||
150
152
  ((code == 1) && noTestsFound) ||
151
153
  ((code == 1) && missingJest && passWithNoTests)) {
152
- process.chdir(workDir)
153
154
  await addApp()
154
155
  } else {
155
156
  console.error('Biz-A Add aborted');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "biz-a-cli",
3
3
  "nameDev": "biz-a-cli-dev",
4
- "version": "2.3.67",
4
+ "version": "2.3.68",
5
5
  "versionDev": "0.0.34",
6
6
  "description": "",
7
7
  "main": "bin/index.js",
package/tests/app.test.js CHANGED
@@ -5,6 +5,7 @@ import { finished } from 'node:stream/promises'
5
5
  import { createDecipheriv } from 'node:crypto'
6
6
  import * as tar from "tar"
7
7
  import { env } from "../envs/env.js"
8
+ import path from "node:path"
8
9
 
9
10
  describe('Biz-A Apps CLI', () => {
10
11
  let originalOptions, originalCWD, axios, child_process;
@@ -404,6 +405,8 @@ describe('Biz-A Apps CLI', () => {
404
405
  }
405
406
  const appName = 'compressStressTest1';
406
407
  const fullTestPath = mockDataFolder + appName;
408
+ const absoluteFullTestPath = path.resolve(fullTestPath);
409
+
407
410
  let jestArgs = ['--no-install', 'jest', '--json'];
408
411
  let jestArgsWithPassNoTest = jestArgs.slice();
409
412
  jestArgsWithPassNoTest.push('--passWithNoTests');
@@ -414,6 +417,7 @@ describe('Biz-A Apps CLI', () => {
414
417
  }
415
418
 
416
419
  function continueExpect(args) {
420
+ expect(process.cwd()).toBe(absoluteFullTestPath);
417
421
  expect(child_process.spawn).toBeCalledWith("npx", args, { "shell": true });
418
422
  expect(logSpy.mock.calls[logSpy.mock.calls.length - JEST_MESSAGE_TOTAL - 2][0]).toBe('====================');
419
423
  expect(logSpy.mock.calls[logSpy.mock.calls.length - JEST_MESSAGE_TOTAL - 1][0]).toBe(jestMessage);
@@ -422,6 +426,7 @@ describe('Biz-A Apps CLI', () => {
422
426
  }
423
427
 
424
428
  function abortExpect(args) {
429
+ expect(process.cwd()).toBe(absoluteFullTestPath);
425
430
  expect(child_process.spawn).toBeCalledWith("npx", args, { "shell": true });
426
431
  expect(logSpy.mock.calls[logSpy.mock.calls.length - JEST_MESSAGE_TOTAL][0]).toBe('====================');
427
432
  expect(logSpy.mock.calls[logSpy.mock.calls.length - JEST_MESSAGE_TOTAL + 1][0]).toBe(jestMessage);