const { expect } = require("chai")

describe("Chevrotain Webpacking support", () => {
    it("Can be webpacked without any special configuration when the grammar and tokens are defined in the same file", () => {
        const parse = require("../lib/webpacked.min").parse
        const parseResult = parse("[1,2,3]")
        expect(parseResult.errors).to.be.empty
    })
})

const { expect } = require("chai")
const { lt } = require("semver")

// not sure why this fails on nodejs 6 nor do I believe it is relevant to the example.
let itButSkipOnNode6 = lt(process.version, "8.0.0") ? it.skip : it

describe("Chevrotain Webpacking support", () => {
    itButSkipOnNode6(
        "Can be webpacked by configuring reserved words for name mangling",
        () => {
            const parse = require("../lib/webpacked.min").parse
            const parseResult = parse("[1,2,3]")
            expect(parseResult.errors).to.be.empty
        }
    )
})

Fix failing build under node.js 6
Fix failing build under node.js 6
