UNPKG

node-hag

Version:

Node HTML Asset Generator (HAG) - converts HTML and CSS templates into rendered Image assets, and can also produce Text and JSON assets.

15 lines (12 loc) 384 B
const expect = require('chai').expect const read = require('promise-path').read const stringify = require('./stringify') function compare (actualPath, expectedPath) { return Promise.all([ read(actualPath).then(stringify), read(expectedPath).then(stringify) ]).then(function (files) { expect(files[0].trim()).to.equal(files[1].trim()) }) } module.exports = compare