biz-a-cli 2.3.65 → 2.3.66

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
@@ -124,6 +124,8 @@ Object
124
124
  }
125
125
 
126
126
  async function runUnitTests() { //SCY BZ 4331
127
+ process.chdir(options.workingDir)
128
+
127
129
  const child = spawn('npx', ['jest'], { stdio: 'inherit', shell: true });
128
130
  child.on('close', async (code) => {
129
131
  if (code == 0) {
@@ -140,7 +142,6 @@ Object
140
142
  base64 => 4 char = 3 bytes => can be encrypted. Smaller size compare to Hex
141
143
  utf8 => 1 char = 1 - 4 bytes => can not be encrypted, encryption need precise bytes per Character. Smallest Size compare to Hex and base64
142
144
  */
143
- process.chdir(options.workingDir)
144
145
  try {
145
146
  const bundlingStart = performance.now()
146
147
  const rootFolder = './upload/'
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.65",
4
+ "version": "2.3.66",
5
5
  "versionDev": "0.0.34",
6
6
  "description": "",
7
7
  "main": "bin/index.js",
package/tests/app.test.js CHANGED
@@ -399,11 +399,13 @@ describe('Biz-A Apps CLI', () => {
399
399
  }
400
400
  }
401
401
  const appName = 'compressStressTest1';
402
-
402
+ const oldCwd = process.cwd();
403
403
  mockValidTemplates(appName, mockScripts);
404
404
  await runCommand('add', '-s', 'https://a.b.c', '-p', '1205', '-i', '2', '-d', mockDataFolder + '/' + appName)
405
405
 
406
- expect(errorSpy.mock.calls[errorSpy.mock.calls.length - 1][0]).toBe('Biz-A Add aborted')
406
+ expect(process.cwd()).toStrictEqual(`${oldCwd}${mockDataFolder.split('.')[1].replaceAll('/', '\\')}${appName}`);
407
+ expect(child_process.spawn).toBeCalledWith("npx", ["jest"], { "shell": true, "stdio": "inherit" });
408
+ expect(errorSpy.mock.calls[errorSpy.mock.calls.length - 1][0]).toBe('Biz-A Add aborted');
407
409
  })
408
410
  })
409
411