mirror of
https://github.com/pezkuwichain/phishing.git
synced 2026-06-14 04:01:00 +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');
|
const config = require('@polkadot/dev/config/jest.cjs');
|
||||||
|
|
||||||
module.exports = Object.assign({}, config, {
|
module.exports = Object.assign({}, config, {
|
||||||
moduleNameMapper: {
|
moduleNameMapper: {},
|
||||||
},
|
|
||||||
modulePathIgnorePatterns: [
|
modulePathIgnorePatterns: [
|
||||||
'<rootDir>/build'
|
'<rootDir>/build'
|
||||||
],
|
],
|
||||||
|
|||||||
+3
-3
@@ -22,13 +22,13 @@
|
|||||||
"test": "polkadot-dev-run-test --coverage --runInBand --testPathIgnorePatterns addrcheck --testPathIgnorePatterns crosscheck"
|
"test": "polkadot-dev-run-test --coverage --runInBand --testPathIgnorePatterns addrcheck --testPathIgnorePatterns crosscheck"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.17",
|
"@babel/core": "^7.13.8",
|
||||||
"@polkadot/dev": "^0.61.26",
|
"@polkadot/dev": "^0.61.30",
|
||||||
"@types/jest": "^26.0.20"
|
"@types/jest": "^26.0.20"
|
||||||
},
|
},
|
||||||
"version": "0.5.40",
|
"version": "0.5.40",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pinata/sdk": "^1.1.11",
|
"@pinata/sdk": "^1.1.12",
|
||||||
"dnslink-cloudflare": "^3.0.0"
|
"dnslink-cloudflare": "^3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,10 +12,10 @@
|
|||||||
"repository": "github.com:polkadot-js/phishing",
|
"repository": "github.com:polkadot-js/phishing",
|
||||||
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
"homepage": "https://github.com/polkadot-js/common/tree/master/packages/phishing#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.12.18",
|
"@babel/runtime": "^7.13.8",
|
||||||
"@polkadot/util": "^5.7.1",
|
"@polkadot/util": "^5.8.1",
|
||||||
"@polkadot/util-crypto": "^5.7.1",
|
"@polkadot/util-crypto": "^5.8.1",
|
||||||
"@polkadot/x-fetch": "^5.7.1"
|
"@polkadot/x-fetch": "^5.8.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-yaml": "^4.0.0",
|
"@types/js-yaml": "^4.0.0",
|
||||||
|
|||||||
@@ -6,13 +6,13 @@ import allowed from '../../../known.json';
|
|||||||
import { checkAddress, checkIfDenied } from '.';
|
import { checkAddress, checkIfDenied } from '.';
|
||||||
|
|
||||||
describe('checkIfDenied', (): void => {
|
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(
|
expect(
|
||||||
await checkIfDenied('polkadot.network')
|
await checkIfDenied('polkadot.network')
|
||||||
).toEqual(false);
|
).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(
|
expect(
|
||||||
await checkIfDenied('https://polkadot.network')
|
await checkIfDenied('https://polkadot.network')
|
||||||
).toEqual(false);
|
).toEqual(false);
|
||||||
@@ -65,8 +65,13 @@ describe('checkAddress', (): void => {
|
|||||||
|
|
||||||
describe('check additions', (): void => {
|
describe('check additions', (): void => {
|
||||||
it('has no entries on the known addresses list', (): 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 added = Object
|
||||||
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));
|
.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([]);
|
expect(dupes).toEqual([]);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user