You've already forked simple-icons
mirror of
https://github.com/simple-icons/simple-icons.git
synced 2025-11-23 21:34:49 +02:00
Switch testing framework from jest to uvu (#6915)
* switch from jest to uvu * remove jest config * convert index.test.js to uvu * use assert.type * Get rid of jest-diff * Remove uneeded splits * remove out.txt * switch to fake-diff
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const { diffLinesUnified } = require('jest-diff');
|
||||
const fakeDiff = require('fake-diff');
|
||||
|
||||
const UTF8 = 'utf8';
|
||||
|
||||
@@ -58,15 +58,7 @@ const TESTS = {
|
||||
const dataString = fs.readFileSync(dataFile, UTF8).replace(/\r\n/g, '\n');
|
||||
const dataPretty = `${JSON.stringify(data, null, ' ')}\n`;
|
||||
if (dataString !== dataPretty) {
|
||||
const dataDiff = diffLinesUnified(
|
||||
dataString.split('\n'),
|
||||
dataPretty.split('\n'),
|
||||
{
|
||||
expand: false,
|
||||
omitAnnotationLines: true,
|
||||
},
|
||||
);
|
||||
|
||||
const dataDiff = fakeDiff(dataString, dataPretty);
|
||||
return `Data file is formatted incorrectly:\n\n${dataDiff}`;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user