diff options
author | XhmikosR <xhmikosr@gmail.com> | 2022-02-23 21:34:18 +0300 |
---|---|---|
committer | Luke Karrys <luke@lukekarrys.com> | 2022-02-23 21:34:59 +0300 |
commit | 63b35578bd759cb5f3edaaef1c1122ecd0b27f48 (patch) | |
tree | 93015dc0f9fc14b4499bda87d4f3ba77ce6756d5 /workspaces/arborist | |
parent | d9b63784dbef50c5b3a7bd62ba5df1aaa45133fc (diff) |
fix(arborist): fix superfluous arguments (#4464)
Diffstat (limited to 'workspaces/arborist')
-rw-r--r-- | workspaces/arborist/test/audit-report.js | 2 | ||||
-rw-r--r-- | workspaces/arborist/test/diff.js | 2 | ||||
-rw-r--r-- | workspaces/arborist/test/inventory.js | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/workspaces/arborist/test/audit-report.js b/workspaces/arborist/test/audit-report.js index 16ea7e13b..c9c610c84 100644 --- a/workspaces/arborist/test/audit-report.js +++ b/workspaces/arborist/test/audit-report.js @@ -30,7 +30,7 @@ const sortReport = report => { { ...vuln, via: (vuln.via || []).sort((a, b) => - String(a.source || a).localeCompare(String(b.source || b, 'en'))), + String(a.source || a).localeCompare(String(b.source || b), 'en')), effects: (vuln.effects || []).sort((a, b) => a.localeCompare(b, 'en')), }, ]) diff --git a/workspaces/arborist/test/diff.js b/workspaces/arborist/test/diff.js index 0e943d578..78e59c293 100644 --- a/workspaces/arborist/test/diff.js +++ b/workspaces/arborist/test/diff.js @@ -31,7 +31,7 @@ const formatDiff = obj => removed: obj.removed.map(d => normalizePath(d.path).split(normalizedCWD).join('{CWD}')), children: [...obj.children] .map(formatDiff) - .sort((a, b) => path(a).localeCompare(path(b, 'en'))), + .sort((a, b) => path(a).localeCompare(path(b), 'en')), }) t.formatSnapshot = obj => format(formatDiff(obj), { sort: false }) diff --git a/workspaces/arborist/test/inventory.js b/workspaces/arborist/test/inventory.js index cb0a286c9..31995e0ca 100644 --- a/workspaces/arborist/test/inventory.js +++ b/workspaces/arborist/test/inventory.js @@ -21,7 +21,7 @@ t.test('basic operations', t => { i.get('y'), ], 'filter returns an iterable of all matching nodes') - t.same([...i.query('license')].sort((a, b) => String(a).localeCompare(String(b, 'en'))), + t.same([...i.query('license')].sort((a, b) => String(a).localeCompare(String(b), 'en')), ['ISC', 'MIT', undefined]) t.same([...i.query('license', 'MIT')], [ { location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } }, @@ -33,7 +33,7 @@ t.test('basic operations', t => { { location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } }, { location: 'y', name: 'x', package: { licenses: [{ type: 'ISC' }], funding: { url: 'foo' } } }, ], 'can query by name') - t.same([...i.query('funding')].sort((a, b) => String(a).localeCompare(String(b, 'en'))), + t.same([...i.query('funding')].sort((a, b) => String(a).localeCompare(String(b), 'en')), ['bar', 'foo', undefined]) t.same([...i.query('funding', 'foo')], [ { location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } }, |