Skip to content

Async tests appear not to work. #52

@davidjohnstoncoles

Description

@davidjohnstoncoles

I have a simple async test here:

https://jsperf.app/xikime

async function foo() {
	
}

await foo();

These tests just don't run, no error is shown on the browser page, but in the console we see:

VM5570:6 Uncaught SyntaxError: Failed to execute 'insertBefore' on 'Node': await is only valid in async functions and the top level bodies of modules
    at ee (page-66952ebfa7796636.js:1:5240)
    at J (page-66952ebfa7796636.js:1:4166)
    at i (page-66952ebfa7796636.js:1:8793)
    at el (page-66952ebfa7796636.js:1:10202)
    at el (page-66952ebfa7796636.js:1:11275)
    at new Z (page-66952ebfa7796636.js:1:3745)
    at Z (page-66952ebfa7796636.js:1:3719)
    at R.run (page-66952ebfa7796636.js:1:14611)
    at f (page-66952ebfa7796636.js:1:6181)
    at e37a0b60-8a534e0eeb30b5db.js:1:13593

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