ember-cli-internal-test-helpers
Advanced tools
Comparing version 0.9.0 to 0.9.1
'use strict'; | ||
var assert = require('./assert'); | ||
var originTaskFor; | ||
var Promise = require('rsvp'); | ||
var MockBlueprintTaskFor = require('./mock-blueprint-task-for'); | ||
module.exports = { | ||
disableNPM: function(Blueprint) { | ||
originTaskFor = Blueprint.prototype.taskFor; | ||
Blueprint.prototype.taskFor = function(taskName) { | ||
// we don't actually need to run the npm-install task, so lets mock it to | ||
// speedup tests that need it | ||
assert.equal(taskName, 'npm-install'); | ||
return { | ||
run: function() { | ||
return Promise.resolve(); | ||
} | ||
}; | ||
}; | ||
MockBlueprintTaskFor.disableTasks(Blueprint, ['npm-install']); | ||
}, | ||
restoreNPM: function(Blueprint) { | ||
Blueprint.prototype.taskFor = originTaskFor; | ||
MockBlueprintTaskFor.restoreTasks(Blueprint); | ||
} | ||
}; |
{ | ||
"name": "ember-cli-internal-test-helpers", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Internal test helpers for ember-cli", | ||
@@ -8,5 +8,3 @@ "main": "index.js", | ||
"coverage": "istanbul cover node_modules/mocha/bin/_mocha", | ||
"test": "mocha", | ||
"preversion": "npm test", | ||
"postversion": "git push origin master --follow-tags && npm publish" | ||
"test": "mocha" | ||
}, | ||
@@ -13,0 +11,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
30567
40
833
3