Skip to content
This repository was archived by the owner on Oct 10, 2021. It is now read-only.
This repository was archived by the owner on Oct 10, 2021. It is now read-only.

How to use ES6 syntax with zuul test framework #292

@daveashworth

Description

@daveashworth

Using mocha as my test framework, in my mocha.opts file I have the following option to tell mocha to use babel as the compiler:

--compilers js:babel-core/register

In my test file, my first line is:

import React from "react";

And when I run zuul with this test, I see the following output in the console:

import React from "react";
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

Can someone please point me to where I setup zuul to use babel to make this work properly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions