diff --git a/src/commands/api-mesh/__tests__/create.test.js b/src/commands/api-mesh/__tests__/create.test.js index 0bb397d1..f481d924 100644 --- a/src/commands/api-mesh/__tests__/create.test.js +++ b/src/commands/api-mesh/__tests__/create.test.js @@ -11,7 +11,7 @@ governing permissions and limitations under the License. */ const mockConsoleCLIInstance = {}; - +const path = require('node:path'); const CreateCommand = require('../create'); const sampleCreateMeshConfig = require('../../__fixtures__/sample_mesh.json'); const { initSdk, initRequestId, promptConfirm } = require('../../../helpers'); @@ -170,7 +170,7 @@ describe('create command tests', () => { expect(logSpy.mock.calls).toMatchInlineSnapshot(` [ [ - "ENOENT: no such file or directory, open 'dummy_file_path'", + "ENOENT: no such file or directory, open '${path.resolve('dummy_file_path')}'", ], ] `); diff --git a/src/commands/api-mesh/source/__tests__/install.test.js b/src/commands/api-mesh/source/__tests__/install.test.js index 4ce23a2c..b23b1ce0 100644 --- a/src/commands/api-mesh/source/__tests__/install.test.js +++ b/src/commands/api-mesh/source/__tests__/install.test.js @@ -106,7 +106,7 @@ describe('source:install command tests', () => { await InstallCommand.run(['test-03', '-f=notexist.json']).catch(err => { expect(err.message).toEqual( `Something went wrong trying to read the variables file.` + - `\nENOENT: no such file or directory, open 'notexist.json'`, + `\nENOENT: no such file or directory, open '${path.resolve('notexist.json')}'`, ); }); });