MapTests.cs 376 B

1234567891011121314
  1. using Jint.Runtime;
  2. namespace Jint.Tests.Runtime
  3. {
  4. public class MapTests
  5. {
  6. [Fact]
  7. public void ShouldThrowWhenCalledWithoutNew()
  8. {
  9. var e = Assert.Throws<JavaScriptException>(() => new Engine().Execute("const m = new Map(); Map.call(m,[]);"));
  10. Assert.Equal("Constructor Map requires 'new'", e.Message);
  11. }
  12. }
  13. }