Skip to content

Commit

Permalink
try adding --max-old-space-size to env
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 17, 2022
1 parent e9788e4 commit 834ec2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ jobs:

env:
CI: true
NODE_OPTIONS: --max-old-space-size=4096
27 changes: 9 additions & 18 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,31 @@ const zv = require('../index')

describe('parseZoneFile', function () {

it('parses a blank line', function (done) {
it('parses a blank line', async () => {
const r = zv.parseZoneFile(`\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r, [])
done()
})

it('parses two blank lines', function (done) {
it('parses two blank lines', async () => {
const r = zv.parseZoneFile(`\n\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r, [])
done()
})

it('parses a $TTL line', function (done) {
it('parses a $TTL line', async () => {
const r = zv.parseZoneFile(`$TTL 86400\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r[0], { ttl: 86400 })
done()
})

it('parses a $TTL line with a comment', function (done) {
it('parses a $TTL line with a comment', async () => {
const r = zv.parseZoneFile(`$TTL 86400; yikers\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r[0], { ttl: 86400 })
done()
})

it(`parses a SOA`, function (done) {
it(`parses a SOA`, async () => {
const r = zv.parseZoneFile(`example.com. 86400 IN SOA ns1.example.com. hostmaster.example.com. (
2021102100 ; serial
16384 ; refresh
Expand All @@ -57,10 +53,9 @@ describe('parseZoneFile', function () {
expire : 604800,
minimum: 2560,
})
done()
})

it('parses a NS line', function (done) {
it('parses a NS line', async () => {
const r = zv.parseZoneFile(`cadillac.net. 14400 IN NS ns1.cadillac.net.\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r[0], {
Expand All @@ -70,10 +65,9 @@ describe('parseZoneFile', function () {
type : 'NS',
dname: 'ns1.cadillac.net.',
})
done()
})

it('parses an A line', function (done) {
it('parses an A line', async () => {
const r = zv.parseZoneFile(`cadillac.net. 86400 IN A 66.128.51.173\n`)
// console.dir(r, { depth: null })
assert.deepStrictEqual(r[0], {
Expand All @@ -83,10 +77,9 @@ describe('parseZoneFile', function () {
type : 'A',
address: '66.128.51.173',
})
done()
})

it('parses the cadillac.net zone file', function (done) {
it('parses the cadillac.net zone file', async () => {
const file = './test/fixtures/zones/cadillac.net'
fs.readFile(file, (err, buf) => {
if (err) throw err
Expand All @@ -95,18 +88,16 @@ describe('parseZoneFile', function () {
// console.dir(r, { depth: null })
assert.equal(r.length, 41)
})
done()
})

it('parses the isi.edu zone file', function (done) {
it('parses the isi.edu zone file', async () => {
const file = './test/fixtures/zones/isi.edu'
fs.readFile(file, (err, buf) => {
if (err) throw err

const r = zv.parseZoneFile(buf.toString())
// console.dir(r, { depth: null })
assert.equal(r.length, 11)
done()
})
})
})

0 comments on commit 834ec2c

Please sign in to comment.