ISSUE: Error compiling HttpClient class in signalr.js due to delete method.
TEST CASE: Run the Test NUglify.Tests.JavaScript => Bugs => Bug353 (Fixed in PR#354)
Stack Trace:
TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) line 906
TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700
Bugs.BugXXX() line 18
1) at NUglify.Tests.JavaScript.Common.TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) in \NUglify\src\NUglify.Tests\JavaScript\Common\TestHelper.cs:line 906
TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700
Bugs.BugXXX() line 18
Standard Output:
INPUT FILE: \NUglify\src\NUglify.Tests\bin\Debug\TestData\JS\Input\Bugs\BugXXX.js
class HttpClient {
delete(url, options) {
return this.send({
...options,
method: "DELETE",
url,
});
}
}
---ERRORS---
NoIdentifier
Error JS1010 at Line 2, Column 5: Expected identifier: delete
Expected identifier: delete
UNEXPECTED
UNEXPECTED ERROR RESULTS
ISSUE: Error compiling HttpClient class in signalr.js due to delete method.
TEST CASE: Run the Test NUglify.Tests.JavaScript => Bugs => Bug353 (Fixed in PR#354)
Stack Trace: TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) line 906 TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700 Bugs.BugXXX() line 18 1) at NUglify.Tests.JavaScript.Common.TestHelper.RunErrorTest(String settingsSwitches, JSError[] expectedErrorArray) in \NUglify\src\NUglify.Tests\JavaScript\Common\TestHelper.cs:line 906 TestHelper.RunErrorTest(JSError[] expectedErrorArray) line 700 Bugs.BugXXX() line 18
Standard Output: INPUT FILE: \NUglify\src\NUglify.Tests\bin\Debug\TestData\JS\Input\Bugs\BugXXX.js class HttpClient { delete(url, options) { return this.send({ ...options, method: "DELETE", url, }); } }
FIX: Added the following code to JSKeyword.cs
case JSToken.Delete: return "delete";