positron
positron copied to clipboard
Add resemblejs to smoke tests
Override yarn config in smoke tests to use node runtime instead of electron. It seems that the tests need to compile resemblejs to target node instead of electron so that the correct header files are used.
Using npm worked because it doesn't have anything set to target the Electron runtime. Yarn was merging in the options <positron root>/.yarnrc, which sets the runtime to electron.
QA Notes
// import { compareImages } from 'resemblejs';
// importing the dependency as require to avoid error once transpiled to .js
const compareImages = require('resemblejs/compareImages');
Using the package might need to be done like this. My early testing had some issues with imports and it didn't know how to find resemblejs during runtime.