mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-04-26 02:58:01 +00:00
Bump deps (#141)
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
exclude_patterns:
|
||||
- "**/*.spec.js"
|
||||
- "**/*.spec.ts"
|
||||
- "docs/**/*.js"
|
||||
+1
-2
@@ -4,8 +4,7 @@
|
||||
const config = require('@polkadot/dev/config/jest.cjs');
|
||||
|
||||
module.exports = Object.assign({}, config, {
|
||||
moduleNameMapper: {
|
||||
},
|
||||
moduleNameMapper: {},
|
||||
modulePathIgnorePatterns: [
|
||||
'<rootDir>/build'
|
||||
],
|
||||
|
||||
+3
-3
@@ -22,13 +22,13 @@
|
||||
"test": "polkadot-dev-run-test --coverage --runInBand --testPathIgnorePatterns addrcheck --testPathIgnorePatterns crosscheck"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.12.17",
|
||||
"@polkadot/dev": "^0.61.26",
|
||||
"@babel/core": "^7.13.8",
|
||||
"@polkadot/dev": "^0.61.30",
|
||||
"@types/jest": "^26.0.20"
|
||||
},
|
||||
"version": "0.5.40",
|
||||
"dependencies": {
|
||||
"@pinata/sdk": "^1.1.11",
|
||||
"@pinata/sdk": "^1.1.12",
|
||||
"dnslink-cloudflare": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
"repository": "github.com:polkadot-js/phishing",
|
||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.12.18",
|
||||
"@polkadot/util": "^5.7.1",
|
||||
"@polkadot/util-crypto": "^5.7.1",
|
||||
"@polkadot/x-fetch": "^5.7.1"
|
||||
"@babel/runtime": "^7.13.8",
|
||||
"@polkadot/util": "^5.8.1",
|
||||
"@polkadot/util-crypto": "^5.8.1",
|
||||
"@polkadot/x-fetch": "^5.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/js-yaml": "^4.0.0",
|
||||
|
||||
@@ -6,13 +6,13 @@ import allowed from '../../../known.json';
|
||||
import { checkAddress, checkIfDenied } from '.';
|
||||
|
||||
describe('checkIfDenied', (): void => {
|
||||
it('returns false when host in list', async (): Promise<void> => {
|
||||
it('returns false when host is not listed', async (): Promise<void> => {
|
||||
expect(
|
||||
await checkIfDenied('polkadot.network')
|
||||
).toEqual(false);
|
||||
});
|
||||
|
||||
it('returns false when host in list (with protocol)', async (): Promise<void> => {
|
||||
it('returns false when host is not listed (with protocol)', async (): Promise<void> => {
|
||||
expect(
|
||||
await checkIfDenied('https://polkadot.network')
|
||||
).toEqual(false);
|
||||
@@ -65,8 +65,13 @@ describe('checkAddress', (): void => {
|
||||
|
||||
describe('check additions', (): void => {
|
||||
it('has no entries on the known addresses list', (): void => {
|
||||
const added = Object.values(denied as Record<string, string[]>).reduce((all: string[], addrs: string[]) => all.concat(addrs), []);
|
||||
const dupes = Object.entries(allowed as Record<string, string[]>).reduce((all: [string, string][], [site, addrs]) => all.concat(addrs.map((a) => [site, a])), []).filter(([, a]) => added.includes(a));
|
||||
const added = Object
|
||||
.values(denied as Record<string, string[]>)
|
||||
.reduce<string[]>((all, addrs) => all.concat(addrs), []);
|
||||
const dupes = Object
|
||||
.entries(allowed as Record<string, string[]>)
|
||||
.reduce<[string, string][]>((all, [site, addrs]) => all.concat(addrs.map((a) => [site, a])), [])
|
||||
.filter(([, a]) => added.includes(a));
|
||||
|
||||
expect(dupes).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user