Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-internal-test-helpers

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-internal-test-helpers - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

31

lib/helpers/assert-file.js

@@ -9,2 +9,3 @@ 'use strict';

var EOL = require('os').EOL;
var walkSync = require('walk-sync');
var existsSync = require('exists-sync');

@@ -42,10 +43,25 @@

module.exports = function assertFile(file, options) {
// console.log(process.cwd(), file)
var filePath = path.join(process.cwd(), file);
expect(existsSync(filePath)).to.equal(true, 'expected ' + file + ' to exist');
var exists = existsSync(filePath);
// console.log(filePath + ' exists: ',exists)
if(!exists) {
debug(filePath + ' contents:')
debug(walkSync(process.cwd()))
}
expect(exists).to.equal(true, 'expected ' + file + ' to exist');
if (!options) {
debug('no options, returning.');
// console.log('no options')
return;
}
var actual = fs.readFileSync(filePath, { encoding: 'utf-8' });
try {
// console.log('trying to read: ', filePath)
var actual = fs.readFileSync(filePath, { encoding: 'utf-8' });
} catch (err) {
console.log('content assert read error')
// console.error(err.message);
// console.error(err.stack);
throw err;
}
if (options.contains) {

@@ -82,3 +98,2 @@ flatten([options.contains]).forEach(function(expected) {

}
expect(pass).to.equal(true, EOL + EOL + 'expected ' + file + ':' + EOL + EOL +

@@ -90,2 +105,8 @@ actual + EOL +

}
if (options.isEmpty) {
expect(actual).to.equal('', EOL + EOL + 'expected ' + file + ':' + EOL + EOL +
actual + EOL +
'to be empty.' + EOL);
}
};

@@ -92,0 +113,0 @@

5

package.json
{
"name": "ember-cli-internal-test-helpers",
"version": "0.4.0",
"version": "0.5.0",
"description": "Internal test helpers for ember-cli",

@@ -31,3 +31,4 @@ "main": "index.js",

"symlink-or-copy": "^1.0.1",
"through": "^2.3.8"
"through": "^2.3.8",
"walk-sync": "^0.2.6"
},

@@ -34,0 +35,0 @@ "devDependencies": {

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