Skip to content

Commit ecec448

Browse files
n3dst4SBoudrias
authored andcommitted
fix aliasing for (no)jsonFileContent aliases (#17)
1 parent 6671839 commit ecec448

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ assert.JSONFileContent = assert.jsonFileContent = function (filename, content) {
249249
* @param {Object} content An object of key/values the file should not contain
250250
*/
251251

252-
assert.JSONFileContent = assert.noJsonFileContent = function (filename, content) {
252+
assert.noJSONFileContent = assert.noJsonFileContent = function (filename, content) {
253253
var obj = JSON.parse(fs.readFileSync(filename, 'utf8'));
254254
assert.noObjectContent(obj, content);
255255
};

test.js

+8
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ describe('yeoman-assert', function () {
254254
describe('.jsonFileContent()', function () {
255255
var file = path.join(__dirname, 'fixtures/dummy.json');
256256

257+
it('is aliased to .JSONFileContent()', function () {
258+
assert(yoAssert.jsonFileContent === yoAssert.JSONFileContent);
259+
});
260+
257261
it('pass if file contains the keys', function () {
258262
assert.doesNotThrow(yoAssert.jsonFileContent.bind(yoAssert, file, {
259263
a: {b: 1},
@@ -281,6 +285,10 @@ describe('yeoman-assert', function () {
281285
describe('.noJsonFileContent()', function () {
282286
var file = path.join(__dirname, 'fixtures/dummy.json');
283287

288+
it('is aliased to .noJSONFileContent()', function () {
289+
assert(yoAssert.noJsonFileContent === yoAssert.noJSONFileContent);
290+
});
291+
284292
it('fails if file contains the keys', function () {
285293
assert.throws(yoAssert.noJsonFileContent.bind(yoAssert, file, {
286294
a: {b: 1},

0 commit comments

Comments
 (0)