mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Allow yarn locator hash calc to fail e.g. Windows
This commit is contained in:
@@ -147,7 +147,9 @@ describe('libvips binaries', function () {
|
||||
|
||||
it('yarn locator hash', () => {
|
||||
const locatorHash = libvips.yarnLocator();
|
||||
assert.strictEqual(locatorHash.length, 10);
|
||||
assert.strict(/[a-f0-9]{10}/.test(locatorHash));
|
||||
if (locatorHash.length) {
|
||||
assert.strict(locatorHash.length, 10);
|
||||
assert.strict(/[a-f0-9]{10}/.test(locatorHash));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user