Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/commands/app/create.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const path = require('path');

const context = require('../../../lib/cli/context');
const yarn = require('../../../lib/yarn');
Expand Down Expand Up @@ -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();
});
Expand Down
6 changes: 3 additions & 3 deletions test/platform/alias-service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
};
});

Expand All @@ -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'),
});
});
});
Expand Down Expand Up @@ -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 () {
Expand Down
Loading