mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
chore: drop q module (#833)
* chore: drop q module * chore: fix & complete dropping q * Fix faulty transformation of Q.when * Simplify thenResolve transformation * Removes unnecesary Promise wrapping in onFulfilled callback. * Transform .done calls to .then or .catch * The important thing is that we always handle rejections. * Remove Q from specs Requires Jasmine 3.5 * Replace Q.timeout w/ Promise.race & custom function Co-authored-by: Raphael von der Grün <raphinesse@gmail.com>
This commit is contained in:
@@ -22,7 +22,6 @@ var create = rewire('../../bin/lib/create');
|
||||
var check_reqs = require('../../bin/templates/cordova/lib/check_reqs');
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var Q = require('q');
|
||||
var shell = require('shelljs');
|
||||
|
||||
describe('create', function () {
|
||||
@@ -129,8 +128,8 @@ describe('create', function () {
|
||||
Manifest_mock.prototype.setPackageId.and.returnValue(new Manifest_mock());
|
||||
Manifest_mock.prototype.getActivity.and.returnValue(new Manifest_mock());
|
||||
Manifest_mock.prototype.setName.and.returnValue(new Manifest_mock());
|
||||
spyOn(create, 'validatePackageName').and.returnValue(Q());
|
||||
spyOn(create, 'validateProjectName').and.returnValue(Q());
|
||||
spyOn(create, 'validatePackageName').and.resolveTo();
|
||||
spyOn(create, 'validateProjectName').and.resolveTo();
|
||||
spyOn(create, 'setShellFatal').and.callFake(function (noop, cb) { cb(); });
|
||||
spyOn(create, 'copyJsAndLibrary');
|
||||
spyOn(create, 'copyScripts');
|
||||
|
||||
Reference in New Issue
Block a user