ember-cli-legacy-blueprints
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -11,3 +11,4 @@ import { moduleForComponent, test } from 'ember-qunit';<% if (testType === 'integration') { %> | ||
test('it renders', function(assert) { | ||
<% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value'); | ||
<% if (testType === 'integration' ) { %> | ||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
@@ -14,0 +15,0 @@ |
import { expect } from 'chai'; | ||
import { describe, it, beforeEach } from 'mocha'; | ||
import Ember from 'ember'; | ||
import <%= classifiedModuleName %>Initializer from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; | ||
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; | ||
import destroyApp from '../../helpers/destroy-app'; | ||
@@ -16,5 +17,9 @@ describe('<%= friendlyTestName %>', function() { | ||
afterEach(function() { | ||
destroyApp(application); | ||
}); | ||
// Replace this with your real tests. | ||
it('works', function() { | ||
<%= classifiedModuleName %>Initializer.initialize(application); | ||
initialize(application); | ||
@@ -21,0 +26,0 @@ // you would normally confirm the results of the initializer here |
import Ember from 'ember'; | ||
import <%= classifiedModuleName %>Initializer from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; | ||
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>'; | ||
import { module, test } from 'qunit'; | ||
import destroyApp from '../../helpers/destroy-app'; | ||
let application; | ||
module('<%= friendlyTestName %>', { | ||
beforeEach() { | ||
Ember.run(function() { | ||
application = Ember.Application.create(); | ||
application.deferReadiness(); | ||
Ember.run(() => { | ||
this.application = Ember.Application.create(); | ||
this.application.deferReadiness(); | ||
}); | ||
}, | ||
afterEach() { | ||
destroyApp(this.application); | ||
} | ||
@@ -18,3 +20,3 @@ }); | ||
test('it works', function(assert) { | ||
<%= classifiedModuleName %>Initializer.initialize(application); | ||
initialize(this.application); | ||
@@ -21,0 +23,0 @@ // you would normally confirm the results of the initializer here |
@@ -7,3 +7,3 @@ import Ember from 'ember'; | ||
module('<%= friendlyTestName %>', { | ||
beforeEach: function() { | ||
beforeEach() { | ||
Ember.run(() => { | ||
@@ -14,3 +14,3 @@ this.application = Ember.Application.create(); | ||
}, | ||
afterEach: function() { | ||
afterEach() { | ||
Ember.run(this.appInstance, 'destroy'); | ||
@@ -17,0 +17,0 @@ destroyApp(this.application); |
@@ -0,2 +1,4 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var VersionChecker = require('ember-cli-version-checker'); | ||
@@ -15,3 +17,8 @@ module.exports = function(blueprint) { | ||
} else if ('ember-cli-mocha' in dependencies) { | ||
type = 'mocha'; | ||
var checker = new VersionChecker({ project: this.project }); | ||
if (fs.existsSync(this.path + '/mocha-0.12-files') && checker.for('ember-cli-mocha', 'npm').satisfies('>=0.12.0')) { | ||
type = 'mocha-0.12'; | ||
} else { | ||
type = 'mocha'; | ||
} | ||
} else { | ||
@@ -18,0 +25,0 @@ this.ui.writeLine('Couldn\'t determine test style - using QUnit'); |
{ | ||
"name": "ember-cli-legacy-blueprints", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "The default blueprint for ember-cli addons.", | ||
@@ -19,3 +19,3 @@ "files": [ | ||
"engines": { | ||
"node": ">= 0.10.0" | ||
"node": ">= 0.12" | ||
}, | ||
@@ -48,2 +48,3 @@ "author": "", | ||
"ember-cli-valid-component-name": "^1.0.0", | ||
"ember-cli-version-checker": "^1.1.7", | ||
"ember-router-generator": "^1.0.0", | ||
@@ -50,0 +51,0 @@ "exists-sync": "0.0.3", |
@@ -32,3 +32,6 @@ # ember-cli-legacy-blueprints | ||
* initializer-addon | ||
* intializer-test | ||
* initializer-test | ||
* instance-initializer | ||
* instance-initializer-addon | ||
* instance-initializer-test | ||
* mixin | ||
@@ -35,0 +38,0 @@ * mixin-test |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
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
60058
107
1512
108
17
3
+ Addedember-cli-version-checker@1.3.1(transitive)
+ Addedsemver@5.7.2(transitive)