MCPcopy Create free account
hub / github.com/ember-cli/ember-try / assertFileContainsJSON

Function assertFileContainsJSON

test/helpers/assert-file-contains-json.js:5–7  ·  view source on GitHub ↗
(filePath, expectedObj)

Source from the content-addressed store, hash-verified

3import path from 'path';
4
5export default function assertFileContainsJSON(filePath, expectedObj) {
6 return assertFileContains(filePath, JSON.stringify(expectedObj, null, 2));
7}
8
9function assertFileContains(filePath, expectedContents) {
10 let regex = new RegExp(`${escapeForRegex(expectedContents)}($|\\W)`, 'gm');

Callers 3

Calls 1

assertFileContainsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…