New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-mocha

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-mocha - npm Package Compare versions

Comparing version 0.9.2 to 0.9.3

2

blueprints/acceptance-test/files/tests/acceptance/__name__-test.js

@@ -14,3 +14,3 @@ /* jshint expr:true */

var application;
beforeEach(function() {

@@ -17,0 +17,0 @@ application = startApp();

@@ -6,15 +6,33 @@ /* jshint expr:true */

it
} from 'ember-mocha';<%= testImports %>
} from 'ember-mocha';<% if (testType === 'integration') { %>
import hbs from 'htmlbars-inline-precompile';<% } %>
describeComponent(
'<%= dasherizedModuleName %>',
'<%= testPrefix %><%= classifiedModuleName %>Component',
'<% if (testType === "integration") { %>Integration: <% } %><%= classifiedModuleName %>Component',
{
<%= testOpts %>
<% if (testType === 'integration' ) { %>integration: true<% } else if(testType === 'unit') { %>// Specify the other units that are required for this test
// needs: ['component:foo', 'helper:bar'],
unit: true<% } %>
},
function() {
it('renders', function() {
<%= testContent %>
<% if (testType === 'integration' ) { %>// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.on('myAction', function(val) { ... });
// Template block usage:
// this.render(hbs`
// {{#<%= dasherizedModuleName %>}}
// template content
// {{/<%= dasherizedModuleName %>}}
// `);
this.render(hbs`{{<%= dasherizedModuleName %>}}`);
expect(this.$()).to.have.length(1);<% } else if(testType === 'unit') { %>// creates the component instance
var component = this.subject();
// renders the component on the page
this.render();
expect(component).to.be.ok;
expect(this.$()).to.have.length(1);<% } %>
});
}
);
/*jshint node:true*/
var EOL = require('os').EOL;
module.exports = {

@@ -23,37 +21,6 @@ description: 'Generates a component integration or unit test.',

locals: function(options) {
var testImports, prefix, testOpts, testContent;
if (options.testType === 'unit') {
testImports = '';
prefix = '';
testOpts = "// specify the other units that are required for this test" + EOL +
" // needs: ['component:foo', 'helper:bar']";
testContent = "// creates the component instance" + EOL +
" var component = this.subject();" + EOL +
" // renders the component on the page" + EOL +
" this.render();" + EOL +
" expect(component).to.be.ok;" + EOL +
" expect(this.$()).to.have.length(1);";
} else {
testImports = EOL + "import hbs from 'htmlbars-inline-precompile';";
prefix = 'Integration: ';
testOpts = 'integration: true';
testContent = "// Set any properties with this.set('myProperty', 'value');" + EOL +
" // Handle any actions with this.on('myAction', function(val) { ... });" + EOL +
" // Template block usage:" + EOL +
" // this.render(hbs`" + EOL +
" // {{#" + options.entity.name + "}}" + EOL +
" // template content" + EOL +
" // {{/" + options.entity.name + "}}" + EOL +
" // `);" + EOL + EOL +
" this.render(hbs`{{" + options.entity.name + "}}`);" + EOL +
" expect(this.$()).to.have.length(1);";
}
var testType = options.testType || "integration";
return {
testImports: testImports,
testPrefix: prefix,
testOpts: testOpts,
testContent: testContent,
integration: options.integration,
testType: options.testType
testType: testType
};

@@ -60,0 +27,0 @@ },

{
"name": "ember-cli-mocha",
"version": "0.9.2",
"version": "0.9.3",
"description": "Mocha and Chai tests for ember-cli applications",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc