Fixes broken test suite

This commit is contained in:
Akshay Nair
2020-10-06 23:47:31 +05:30
parent b967170989
commit e05e789fa3
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "Register *.is-a.dev domains for free",
"scripts": {
"test": "jest",
"test": "ENV=test jest",
"publish-records": "yarn test && node ./scripts/register-domains.js"
},
"repository": {
+4 -2
View File
@@ -8,12 +8,14 @@ if (!CI) {
const { NC_USER, NC_API_KEY, NC_DOMAIN, IP_ADDRESS } = process.env;
const IS_TEST = ENV === 'test';
module.exports = {
ENV,
VALID_RECORD_TYPES: ['CNAME', 'A', 'ALIAS', 'URL'],
NC_DOMAIN: NC_DOMAIN || 'booboo.xyz',
NC_USER,
NC_API_KEY,
NC_USER: IS_TEST ? 'testuser' : NC_USER,
NC_API_KEY: IS_TEST ? 'testkey' : NC_API_KEY,
IP_ADDRESS,
TTL: 5*60,
};