Skip to content

Commit e64bf07

Browse files
author
Frank Schmid
committed
Fixed unit tests. Added yarn.lock for convenience.
1 parent b54e2d3 commit e64bf07

File tree

3 files changed

+4041
-9
lines changed

3 files changed

+4041
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"eslint-plugin-lodash": "^2.5.0",
5555
"eslint-plugin-promise": "^3.6.0",
5656
"get-installed-path": "^4.0.8",
57-
"mocha": "^4.0.1",
57+
"mocha": "^5.0.4",
5858
"nyc": "^11.2.1",
5959
"serverless": "^1.23.0",
6060
"sinon": "^4.0.2",

test/index.test.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,19 +177,20 @@ describe('AwsAlias', () => {
177177
});
178178

179179
it('after:aws:deploy:deploy:uploadArtifacts should resolve', () => {
180-
setBucketNameStub.returns(BbPromise.resolve());
181-
uploadAliasArtifactsStub.returns(BbPromise.resolve());
182-
return expect(awsAlias.hooks['after:aws:deploy:deploy:uploadArtifacts']()).to.eventually.be.fulfilled
183-
.then(() => BbPromise.join(
184-
expect(setBucketNameStub).to.be.calledOnce,
185-
expect(uploadAliasArtifactsStub).to.be.calledOnce
186-
));
180+
return expect(awsAlias.hooks['after:aws:deploy:deploy:uploadArtifacts']()).to.eventually.be.fulfilled;
187181
});
188182

189183
it('after:aws:deploy:deploy:updateStack should resolve', () => {
184+
setBucketNameStub.returns(BbPromise.resolve());
185+
uploadAliasArtifactsStub.returns(BbPromise.resolve());
190186
updateAliasStackStub.returns(BbPromise.resolve());
191187
return expect(awsAlias.hooks['after:aws:deploy:deploy:updateStack']()).to.eventually.be.fulfilled
192-
.then(() => expect(updateAliasStackStub).to.be.calledOnce);
188+
.then(() => {
189+
expect(setBucketNameStub).to.be.calledOnce;
190+
expect(uploadAliasArtifactsStub).to.be.calledOnce;
191+
expect(updateAliasStackStub).to.be.calledOnce;
192+
return null;
193+
});
193194
});
194195

195196
it('after:info:info should resolve', () => {

0 commit comments

Comments
 (0)