timezone-abbreviations
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -8,4 +8,9 @@ "use strict"; | ||
const data_json_1 = __importDefault(require("./data.json")); | ||
console.assert(index_1.default[0].abbr === data_json_1.default[1].abbr, "'\x1b[31m%s\x1b[0m'", "timezone data is not matching"); | ||
console.log("timezones type", typeof index_1.default[0]); | ||
console.log("timezones", ...index_1.default.filter((item) => item.abbr === "AEST")); | ||
test("check random item should match", () => { | ||
const randomNumber = Math.floor((index_1.default.length - 1) * Math.random()); | ||
console.log("length", index_1.default.length); | ||
console.log("randomNumber", randomNumber); | ||
expect(index_1.default[randomNumber].abbr).toBe(data_json_1.default[randomNumber].abbr); | ||
console.log("timezones", ...index_1.default.filter((item) => item.abbr === "AEST")); | ||
console.log("timezones type", typeof index_1.default[0]); | ||
}); |
{ | ||
"name": "timezone-abbreviations", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "", | ||
@@ -8,3 +8,3 @@ "main": "dist/index.js", | ||
"build": "tsc", | ||
"test": "node --experimental-modules --loader ts-node/esm src/test.ts" | ||
"test": "jest" | ||
}, | ||
@@ -15,7 +15,13 @@ "keywords": [], | ||
"devDependencies": { | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@tsconfig/node14": "^1.0.1", | ||
"@tsconfig/node16": "^1.0.2", | ||
"@types/jest": "^27.4.1", | ||
"@types/node": "^17.0.23", | ||
"jest": "^27.5.1", | ||
"ts-node": "^10.7.0", | ||
"typescript": "^4.6.2" | ||
} | ||
}, | ||
"dependencies": {} | ||
} |
import timezones from "./index"; | ||
import timezoneData from "./data.json"; | ||
console.assert( | ||
timezones[0].abbr === timezoneData[1].abbr, | ||
"'\x1b[31m%s\x1b[0m'", | ||
"timezone data is not matching" | ||
); | ||
console.log("timezones type", typeof timezones[0]); | ||
console.log("timezones", ...timezones.filter((item) => item.abbr === "AEST")); | ||
test("check random item should match", () => { | ||
const randomNumber = Math.floor((timezones.length - 1) * Math.random()); | ||
console.log("length", timezones.length); | ||
console.log("randomNumber", randomNumber); | ||
expect(timezones[randomNumber].abbr).toBe(timezoneData[randomNumber].abbr); | ||
console.log("timezones", ...timezones.filter((item) => item.abbr === "AEST")); | ||
console.log("timezones type", typeof timezones[0]); | ||
}); |
{ | ||
"extends": "@tsconfig/node14/tsconfig.json", | ||
"module": "commonjs", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"resolveJsonModule": true, | ||
"declaration": true, | ||
"esModuleInterop": true | ||
} | ||
} | ||
"extends": "@tsconfig/node16/tsconfig.json", | ||
"module": "commonjs", | ||
"compilerOptions": { | ||
"outDir": "dist", | ||
"resolveJsonModule": true, | ||
"declaration": true, | ||
"esModuleInterop": true | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67601
14
2135
9