0

I am migrating/converting my test utilities project to ES6.

I am using "@types/qunit": "^2.0.31" version to execute async test cases.

All went well before conversion but after conversion asyncTest cases are not executing, its look like its not stopping execution. While debugging my observation are, cursor start executing first test case but not move out, or even not giving test result as pass/failed.

My tsconfig.json look like

before migration:

"compilerOptions": {
        "module": "amd",
        "types": [
            "QUnitV1"            
        ],
        ...
    },

After migration:

"compilerOptions": {
        "module": "es6",
        "moduleResolution": "node",
        "types": [
            "QUnitV1"
        ],
        ....
    },

Could you please help to know, why the asyncTest cases execution not working after migrating code to ES6?

Aamir
  • 345
  • 4
  • 24

1 Answers1

0

Every non-trivial project that is written in JavaScript contains asynchronous functions. They are used to perform a given action after a certain amount of time, to retrieve data from a server, or event to send data to a server. QUnit provides a method, called QUnit.asyncTest(), whose purpose is to test asynchronous code. The signature of the method is:

QUnit.asyncTest(name, testFunction)