52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`should_fail_without_weak.js 1`] = `
|
|
/* @flow */
|
|
// This should fail without weak mode, because of the glaring type error.
|
|
|
|
function returns_a_string() {
|
|
return "Hello";
|
|
}
|
|
|
|
function expects_an_int() {
|
|
return returns_a_string() * 10;
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/* @flow */
|
|
// This should fail without weak mode, because of the glaring type error.
|
|
|
|
function returns_a_string() {
|
|
return "Hello";
|
|
}
|
|
|
|
function expects_an_int() {
|
|
return returns_a_string() * 10;
|
|
}
|
|
|
|
`;
|
|
|
|
exports[`should_pass_with_weak.js 1`] = `
|
|
/* @flow weak */
|
|
// This should fail without weak mode, because of the glaring type error.
|
|
|
|
function returns_a_string() {
|
|
return "Hello";
|
|
}
|
|
|
|
function expects_an_int() {
|
|
return returns_a_string() * 10;
|
|
}
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
/* @flow weak */
|
|
// This should fail without weak mode, because of the glaring type error.
|
|
|
|
function returns_a_string() {
|
|
return "Hello";
|
|
}
|
|
|
|
function expects_an_int() {
|
|
return returns_a_string() * 10;
|
|
}
|
|
|
|
`;
|