Socket
Socket
Sign inDemoInstall

ember-cli-addon-tests

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-addon-tests - npm Package Compare versions

Comparing version 0.5.1 to 0.6.0

lib/models/app.js

2

lib/index.js
'use strict';
var App = require('./models/app');
var AddonTestApp = require('./models/addon-test-app');
module.exports = {
App: App,
AddonTestApp: AddonTestApp
};

52

lib/models/addon-test-app.js
var fs = require('fs-extra');
var path = require('path');
var findup = require('findup-sync');
var startServer = require('../commands/start-server');
var chdir = require('../utilities/chdir');
var util = require('util');
var App = require('./app');
var debug = require('../utilities/debug');
var runCommand = require('../utilities/run-command');
var pristine = require('../utilities/pristine');

@@ -13,4 +12,7 @@ var RSVP = require('rsvp');

function AddonTestApp() {
App.call(this);
}
util.inherits(AddonTestApp, App);
// Public API for putting an app under test. If the app doesn't

@@ -36,23 +38,2 @@ // exist already, it will create it and put it into the `pristine`

AddonTestApp.prototype.run = function() {
var previousCwd = process.cwd();
chdir(this.path);
return runCommand.apply(null, arguments)
.finally(function() {
chdir(previousCwd);
});
};
AddonTestApp.prototype.runEmberCommand = function() {
var cliPath = path.join(this.path, 'node_modules', 'ember-cli', 'bin', 'ember');
var args = Array.prototype.slice.apply(arguments);
return this.run.apply(this, [cliPath].concat(args));
};
AddonTestApp.prototype.filePath = function(filePath) {
return path.join(this.path, filePath);
};
AddonTestApp.prototype.editPackageJSON = function(cb) {

@@ -65,25 +46,2 @@ var packageJSONPath = path.join(this.path, 'package.json');

AddonTestApp.prototype.startServer = function(options) {
var app = this;
var previousCwd = process.cwd();
process.chdir(app.path);
return startServer(options)
.then(function(server) {
app.server = server;
process.chdir(previousCwd);
});
};
AddonTestApp.prototype.stopServer = function() {
if (!this.server) {
throw new Error("You must call `startServer()` before calling `stopServer()`.");
}
this.server.kill('SIGINT');
this.server = null;
return RSVP.resolve();
};
function copyFixtureFiles(appName, destDir, fixturesPath) {

@@ -90,0 +48,0 @@ fixturesPath = findup(fixturesPath || 'test/fixtures');

{
"name": "ember-cli-addon-tests",
"version": "0.5.1",
"version": "0.6.0",
"description": "A set of integration test helpers for Ember CLI addons",

@@ -32,3 +32,3 @@ "main": "lib/index.js",

"debug": "^2.2.0",
"exists-sync": "0.0.3",
"exists-sync": "0.0.4",
"findup-sync": "^0.3.0",

@@ -42,3 +42,6 @@ "fs-extra": "^0.24.0",

"temp": "^0.8.3"
},
"engines": {
"node": ">= 4"
}
}
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