add traceur test suite
This commit is contained in:
29
test/fixtures/traceur/Classes/ClassNameInStack.js
vendored
Normal file
29
test/fixtures/traceur/Classes/ClassNameInStack.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
class MyClassName {
|
||||
m() {
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
new MyClassName().m();
|
||||
fail('Should have thrown');
|
||||
} catch (ex) {
|
||||
if (ex.stack)
|
||||
assert.isTrue(String(ex.stack).indexOf('MyClassName') >= 0);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class MySecondClass extends MyClassName{
|
||||
m() {
|
||||
throw new Error();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
new MySecondClass().m();
|
||||
fail('Should have thrown');
|
||||
} catch (ex) {
|
||||
if (ex.stack)
|
||||
assert.isTrue(String(ex.stack).indexOf('MySecondClass') >= 0);
|
||||
}
|
||||
Reference in New Issue
Block a user