This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Description
When running yarn test on Windows, the tests fail when computing the hash of the _fixture/ and pancake/ output.
Windows computes newlines differently i.e \r\n than Unix, this is the cause of the issue. Possible solution is the NOT write the .js or .css files with a newline.
Example code:
const Dirsum = require('dirsum');
const path = require('path');
let fixturePath = path.join( __dirname, `tests/test1/_fixture/pancake`);
let pancakeOutPath = path.join( __dirname, `tests/test1/pancake`);
Dirsum.digest( fixturePath, 'md5', ( error, hashes ) => {
console.log( hashes.hash );
});
Dirsum.digest( pancakeOutPath, 'md5', ( error, hashes ) => {
console.log( hashes.hash );
});
Yields:
When run WITH newlines ❌
68502114bcc22efca6e54505d8e524d9
408062afd4b501e22bdf89f30c6cf5a7
When run WITHOUT newlines 👍
9d69ac36fc0407a0c490d447ae27535b
9d69ac36fc0407a0c490d447ae27535b