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

yeoman-assert

Package Overview
Dependencies
Maintainers
6
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yeoman-assert - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

2

index.js

@@ -224,5 +224,5 @@ /**

assert.JSONFileContent = function (filename, content) {
assert.JSONFileContent = assert.jsonFileContent = function (filename, content) {
var obj = JSON.parse(fs.readFileSync(filename, 'utf8'));
assert.objectContent(obj, content);
};
{
"name": "yeoman-assert",
"version": "2.1.0",
"version": "2.1.1",
"description": "Assert utility from yeoman",

@@ -5,0 +5,0 @@ "license": "BSD",

# yeoman-assert [![Build Status](https://travis-ci.org/yeoman/yeoman-assert.svg?branch=master)](https://travis-ci.org/yeoman/yeoman-assert)
> Assert utility from [yeoman](http://github.com/yeoman/generator)
`yeoman-assert` is extending the native Node `assert` module. Every methods in `assert` also is available with `yeoman-assert`, plus some code scaffolding related assertion helpers.
## Install

@@ -15,5 +14,12 @@

```js
var assert = require('yeoman-assert');
### #file
assert(true);
assert.equal(1, 1);
```
### `assert.file()`
- **path** (String|Array) Path to a file.

@@ -35,3 +41,3 @@

### #noFile
### `assert.noFile()`

@@ -54,3 +60,3 @@ - **path** (String|Array) Path to a file.

### #fileContent
### `assert.fileContent()`

@@ -83,3 +89,3 @@ - **file** (String|Array) Path to a file.

### #noFileContent
### `assert.noFileContent()`

@@ -92,3 +98,3 @@ - **file** (String|Array) Path to a file.

```js
assert.fileContent('models/user.js', 'App.User = DS.Model.extend');
assert.noFileContent('models/user.js', 'App.User = DS.Model.extend');

@@ -100,3 +106,3 @@ ```

```js
assert.fileContent('models/user.js', /App\.User = DS\.Model\.extend/);
assert.noFileContent('models/user.js', /App\.User = DS\.Model\.extend/);
```

@@ -107,3 +113,3 @@

```js
assert.fileContent([
assert.noFileContent([
['models/user.js', 'App.User = DS.Model.extend'],

@@ -114,3 +120,3 @@ ['controllers/user.js', /App\.UserController = Ember\.ObjectController\.extend/]

### #textEqual
### `assert.textEqual()`

@@ -127,3 +133,3 @@ - **value** (String) A string.

### #implement
### `assert.implement()`

@@ -136,7 +142,7 @@ - **subject** (Object) Subject implementing the façade.

```js
assert.notImplement(fs, ['readFile']);
assert.implement(fs, ['readFile']);
```
### #notImplement
### `assert.notImplement()`

@@ -152,6 +158,23 @@ - **subject** (Object) Subject not implementing the methods.

### `assert.objectContent()`
Assert an object contains at least a set of keys
```js
var anObject = {a: 1};
assert.objectContent(anObject, {a: 2});
```
### `assert.JSONFileContent()`
Assert a JSON file contains at least a set of keys (rely of `assert.objectContent()`)
```js
assert.JSONFileContent('path/to/file.json', {a: 2});
```
## Contribute
See the [contributing docs](https://github.com/yeoman/yeoman/blob/master/contributing.md).
See the [contributing docs](http://yeoman.io/contributing/).

@@ -158,0 +181,0 @@

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