Skip to content

Commit dd18c12

Browse files
committed
chore():ensure all tests pass.
1 parent 74d1253 commit dd18c12

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

spec/tasks/emulate.spec.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ describe('emulate command', function() {
273273
spyOn(npmScripts, 'runIonicScript').andReturn(Q(true));
274274

275275
emulate.run(null, argv, rawCliArguments).then(function() {
276-
expect(npmScripts.runIonicScript).toHaveBeenCalledWith('build');
276+
expect(npmScripts.runIonicScript).toHaveBeenCalledWith('build', rawCliArguments.slice(2));
277277
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(['emulate', 'android'], false, true);
278278
done();
279279
}).catch(function(e) {
@@ -293,7 +293,7 @@ describe('emulate command', function() {
293293
spyOn(npmScripts, 'runIonicScript').andReturn(Q(true));
294294

295295
emulate.run(null, argv, rawCliArguments).then(function() {
296-
expect(npmScripts.runIonicScript).toHaveBeenCalledWith('build');
296+
expect(npmScripts.runIonicScript).toHaveBeenCalledWith('build', rawCliArguments.slice(2));
297297
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(['emulate', 'android'], false, true);
298298
done();
299299
}).catch(function(e) {
@@ -320,9 +320,11 @@ describe('emulate command', function() {
320320
emulate.run(null, argv, rawCliArguments).then(function() {
321321
expect(npmScripts.hasIonicScript).toHaveBeenCalledWith('build');
322322
expect(npmScripts.runIonicScript).toHaveBeenCalledWith('serve', [
323+
'--runLivereload', '--isPlatformServe', '--livereload',
323324
'--port', jasmine.any(Number),
325+
'--livereload-port', jasmine.any(Number),
324326
'--address', jasmine.any(String),
325-
'--liveReloadPort', jasmine.any(Number),
327+
'--iscordovaserve',
326328
'--nobrowser'
327329
]);
328330
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(['emulate', 'android'], true, true);

spec/tasks/run.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ describe('run command', function() {
320320
spyOn(cordovaUtils, 'startAppScriptsServer').andReturn(Q(true));
321321

322322
run.run(null, argv, rawCliArguments).then(function() {
323-
console.log(rawCliArguments);
324-
expect(npmScripts.hasIonicScript).toHaveBeenCalledWith('build', rawCliArguments.slice(2));
323+
expect(npmScripts.hasIonicScript.calls[0].args).toEqual(['build']);
324+
expect(npmScripts.hasIonicScript.calls[1].args).toEqual(['serve']);
325325
expect(cordovaUtils.startAppScriptsServer).toHaveBeenCalledWith(argv);
326326
expect(cordovaUtils.execCordovaCommand).toHaveBeenCalledWith(['run', 'android'], true, true);
327327
done();

0 commit comments

Comments
 (0)