I created a test using a javascript enum as per this tutorial:
https://www.sohamkamani.com/javascript/enums/
I tested it in standard javascript but i keep getting an error when using it in Jest:
Jest encountered an unexpected token ‘=’
static test1 = new test("test1");
^
SyntaxError: Unexpected token =
this is the enum i created:
class test {
constructor(name) {
this.name = name;
}
static test1 = new test("test1")
static test2 = new test("test2")
static test3 = new test("test3")
}