mirror of
https://github.com/tiennm99/is-a-dev.git
synced 2026-10-13 02:14:43 +00:00
Fixes reg script
This commit is contained in:
1 parent
473add5bd8
commit
5c7612d568
2 files changed
+5
-5
No files matched your search
@@ -9,7 +9,7 @@ const toHostList = R.chain(data => {
|
||||
const rs = getRecords(data.record);
|
||||
|
||||
const records = R.chain(([recordType, urls]) =>
|
||||
urls.map(url => ({
|
||||
(Array.isArray(urls) ? urls : [urls]).map(url => ({
|
||||
HostName: data.name,
|
||||
RecordType: recordType,
|
||||
Address: url,
|
||||
|
||||
@@ -4,8 +4,8 @@ const { NC_DOMAIN, TTL } = require('../utils/constants');
|
||||
describe('toHostList', () => {
|
||||
it('should flatten domain data to list of hosts (without https)', () => {
|
||||
const res = toHostList([
|
||||
{ name: 'akshay', forceHttps: false, record: { CNAME: ['phenax.github.io'] } },
|
||||
{ name: 'foobar', forceHttps: false, record: { CNAME: ['v.io'] } },
|
||||
{ name: 'akshay', forceHttps: false, record: { CNAME: 'phenax.github.io' } },
|
||||
{ name: 'foobar', forceHttps: false, record: { CNAME: 'v.io' } },
|
||||
{ name: 'xx', forceHttps: false, record: { A: ['1.2.3.4', '5.6.3.2', '1.2.31.1'] } },
|
||||
]);
|
||||
|
||||
@@ -20,8 +20,8 @@ describe('toHostList', () => {
|
||||
|
||||
it('should flatten domain data to list of hosts (with https)', () => {
|
||||
const res = toHostList([
|
||||
{ name: 'akshay', forceHttps: true, record: { CNAME: ['phenax.github.io'] } },
|
||||
{ name: 'foobar', forceHttps: false, record: { CNAME: ['v.io'] } },
|
||||
{ name: 'akshay', forceHttps: true, record: { CNAME: 'phenax.github.io' } },
|
||||
{ name: 'foobar', forceHttps: false, record: { CNAME: 'v.io' } },
|
||||
{ name: 'xx', forceHttps: true, record: { A: ['1.2.3.4', '5.6.3.2', '1.2.31.1'] } },
|
||||
]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user