diff --git a/test/commands/app/create.spec.js b/test/commands/app/create.spec.js index f1b6d189..9b47c444 100644 --- a/test/commands/app/create.spec.js +++ b/test/commands/app/create.spec.js @@ -1,4 +1,5 @@ const expect = require('chai').expect; +const path = require('path'); const context = require('../../../lib/cli/context'); const yarn = require('../../../lib/yarn'); @@ -66,7 +67,7 @@ describe('The app create command', function () { this.argv.install = true; this.sut.handler(this.argv) .then(() => { - expect(yarn.install).to.have.been.calledWith('/path/to/working/directory/ui-hello-world'); + expect(yarn.install).to.have.been.calledWith(path.resolve(this.argv.context.cwd, 'ui-hello-world')); expect(console.log).to.have.been.calledWithMatch('then "stripes serve" to run your new app'); done(); }); diff --git a/test/platform/alias-service.spec.js b/test/platform/alias-service.spec.js index 9b5facb3..59632b00 100644 --- a/test/platform/alias-service.spec.js +++ b/test/platform/alias-service.spec.js @@ -16,7 +16,7 @@ const storageStub = { describe('The alias-service', function () { beforeEach(function () { this.aliases = { - '@folio/users': '../ui-users', + '@folio/users': path.join('..', 'ui-users'), }; }); @@ -41,7 +41,7 @@ describe('The alias-service', function () { this.sandbox.stub(cliConfig, 'configPath').value(path.join(path.resolve(), '..', '.stripesclirc')); this.sut = new AliasService(storageStub); expect(this.sut.configAliases).to.deep.equal({ - '@folio/users': '../../ui-users', + '@folio/users': path.join('..', '..', 'ui-users'), }); }); }); @@ -158,7 +158,7 @@ describe('The alias-service', function () { it('converts relative paths to absolute', function () { const result = this.sut.validateAlias('moduleName', '../modulePath'); - expect(result.path[0]).to.equal('/'); + expect(path.isAbsolute(result.path)).to.equal(true); }); it('returns alias data', function () {