Merge pull request 'fix(engagement): the trigger manifest was stale, and its check was crying wolf' (#191) from fix/engagement-manifest-crlf into edge
Reviewed-on: #191
This commit is contained in:
@@ -26,8 +26,16 @@ afterEach(() => registries._reset())
|
||||
const MANIFEST_PATH = path.join(__dirname, '..', 'engagement-triggers.json')
|
||||
const serialize = (m) => `${JSON.stringify(m, null, 2)}\n`
|
||||
|
||||
// **Normalised, like `routeManifest.test.js`'s `read()` one file along.** Under
|
||||
// `core.autocrlf=true` git checks the committed LF blob out as CRLF, so a byte
|
||||
// comparison fails on every Windows checkout while CI stays green — and it fails
|
||||
// saying "the manifest is stale", which is the one thing it is not. The claim
|
||||
// here is that the committed file describes the same declarations; a line ending
|
||||
// is not a declaration.
|
||||
const committedManifest = () => fs.readFileSync(MANIFEST_PATH, 'utf8').replace(/\r\n/g, '\n')
|
||||
|
||||
test('the committed manifest matches the declarations in the tree', () => {
|
||||
const committed = fs.readFileSync(MANIFEST_PATH, 'utf8')
|
||||
const committed = committedManifest()
|
||||
assert.equal(
|
||||
serialize(build()),
|
||||
committed,
|
||||
|
||||
Reference in New Issue
Block a user