Hi,
I followed the tutorial here.
So I installed Microsoft.JavaScript.UnitTest NuGet package.
Put
<PropertyGroup>
...
<JavaScriptTestRoot>tests\</JavaScriptTestRoot>
<JavaScriptTestFramework>Mocha</JavaScriptTestFramework>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
into my csproj.
Put package.json into project root. My package.json contains
{
"version": "1.0.0",
"name": "asp.net",
"private": true,
"devDependencies": {
"mocha": "8.3.0",
"tape": "latest"
}
}
My sample test is
describe('Test Suite 1', function () {
it('getData',
function() {
return true;
});
})