2018-06-15 03:35:39 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`throw_expression.js 1`] = `
|
|
|
|
====================================options=====================================
|
2018-12-27 16:05:19 +03:00
|
|
|
parsers: ["babel"]
|
2018-11-25 11:21:14 +03:00
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2018-06-15 03:35:39 +03:00
|
|
|
function save(filename = throw new TypeError("Argument required")) {}
|
|
|
|
|
|
|
|
lint(ast, {
|
|
|
|
with: () => throw new Error("avoid using 'with' statements.")
|
|
|
|
});
|
|
|
|
|
|
|
|
function getEncoder(encoding) {
|
|
|
|
const encoder = encoding === "utf8" ? new UTF8Encoder()
|
|
|
|
: encoding === "utf16le" ? new UTF16Encoder(false)
|
|
|
|
: encoding === "utf16be" ? new UTF16Encoder(true)
|
|
|
|
: throw new Error("Unsupported encoding");
|
|
|
|
}
|
|
|
|
|
|
|
|
class Product {
|
|
|
|
get id() { return this._id; }
|
|
|
|
set id(value) { this._id = value || throw new Error("Invalid value"); }
|
|
|
|
}
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2018-06-15 03:35:39 +03:00
|
|
|
function save(filename = throw new TypeError("Argument required")) {}
|
|
|
|
|
|
|
|
lint(ast, {
|
|
|
|
with: () => throw new Error("avoid using 'with' statements.")
|
|
|
|
});
|
|
|
|
|
|
|
|
function getEncoder(encoding) {
|
|
|
|
const encoder =
|
|
|
|
encoding === "utf8"
|
|
|
|
? new UTF8Encoder()
|
|
|
|
: encoding === "utf16le"
|
2018-10-14 18:45:37 +03:00
|
|
|
? new UTF16Encoder(false)
|
|
|
|
: encoding === "utf16be"
|
|
|
|
? new UTF16Encoder(true)
|
|
|
|
: throw new Error("Unsupported encoding");
|
2018-06-15 03:35:39 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
class Product {
|
|
|
|
get id() {
|
|
|
|
return this._id;
|
|
|
|
}
|
|
|
|
set id(value) {
|
|
|
|
this._id = value || throw new Error("Invalid value");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2018-06-15 03:35:39 +03:00
|
|
|
`;
|