SetTests.cs 376 B

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