Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions thrown in GlobalScope.using() should not be caught #112

Open
g-arjones opened this issue Sep 29, 2018 · 0 comments
Open

Exceptions thrown in GlobalScope.using() should not be caught #112

g-arjones opened this issue Sep 29, 2018 · 0 comments

Comments

@g-arjones
Copy link

TypeMoq silences exceptions thrown in test cases that use GlobalScope:

it("should fail", () => {
    const mock = TypeMoq.GlobalMock.ofInstance(someFunc);
    TypeMoq.GlobalScope.using(mock).with(() => {
        someFunc();
        assert.equal(1, 2);
    });
});

Output:

2: AssertionError [ERR_ASSERTION]: 1 == 2
  ✓ should fail (68ms)
  1 passing (201ms)

This is terrible for continuous integration environments...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant