Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Windows - Failing test-suite #113

Open
azerella opened this issue Mar 19, 2019 · 0 comments
Open

Windows - Failing test-suite #113

azerella opened this issue Mar 19, 2019 · 0 comments
Assignees
Labels
🐛 bug Something isn't working the way it should. module: pancake An issue or pull request related to pancake.

Comments

@azerella
Copy link
Contributor

azerella commented Mar 19, 2019

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
@azerella azerella added 🐛 bug Something isn't working the way it should. module: pancake-sass An issue or pull request related to pancake-sass. module: pancake-js An issue or pull request related to pancake-js. labels Mar 19, 2019
@azerella azerella self-assigned this Mar 19, 2019
@azerella azerella added module: pancake and removed module: pancake-js An issue or pull request related to pancake-js. module: pancake-sass An issue or pull request related to pancake-sass. labels Mar 19, 2019
@monicagee99 monicagee99 added module: pancake An issue or pull request related to pancake. and removed module: pancake labels Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐛 bug Something isn't working the way it should. module: pancake An issue or pull request related to pancake.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants