mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* bump "@babel/*" deps * bump core-js * bump @babel/core * update eslint-plugin-jest and glob * update Makefile.js * fix linting errors * remove obsolete snapshots * use inline snapshot
28 lines
462 B
JavaScript
28 lines
462 B
JavaScript
"use strict";
|
|
class Base {
|
|
set test(v) {
|
|
throw new Error("gobbledygook");
|
|
}
|
|
}
|
|
|
|
class Obj extends Base {
|
|
call() {
|
|
return super.test();
|
|
}
|
|
}
|
|
Object.defineProperty(Obj.prototype, 'test', {
|
|
writable: true,
|
|
configurable: true,
|
|
value() {
|
|
throw new Error("gobbledygook");
|
|
}
|
|
});
|
|
|
|
const obj = new Obj();
|
|
expect(() => {
|
|
obj.call();
|
|
|
|
// Asser that this throws, but that it's not
|
|
// a gobbledygook error that is thrown
|
|
}).toThrow(TypeError)
|