2017-02-22 00:59:19 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`A.js 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["flow"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-12 23:41:51 +03:00
|
|
|
class Implementation {}
|
2016-12-23 22:31:38 +03:00
|
|
|
export function foo(): Implementation { return new Implementation; }
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2016-12-23 22:31:38 +03:00
|
|
|
class Implementation {}
|
|
|
|
export function foo(): Implementation {
|
2017-01-11 02:51:46 +03:00
|
|
|
return new Implementation();
|
2017-01-11 18:16:38 +03:00
|
|
|
}
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`test_absolute.js 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["flow"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-12 23:41:51 +03:00
|
|
|
/* @flow */
|
2016-12-23 22:31:38 +03:00
|
|
|
|
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-02-22 00:59:19 +03:00
|
|
|
var B1 = require('B');
|
2016-12-23 22:31:38 +03:00
|
|
|
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-02-22 00:59:19 +03:00
|
|
|
var B2 = require('B.js');
|
2016-12-23 22:31:38 +03:00
|
|
|
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var C = require('package_with_full_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var D = require('package_with_partial_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var E = require('package_with_no_package_json');
|
2016-12-23 22:31:38 +03:00
|
|
|
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var F = require('package_with_dir_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-02-22 00:59:19 +03:00
|
|
|
var B1 = require('B');
|
2016-12-23 22:31:38 +03:00
|
|
|
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-02-22 00:59:19 +03:00
|
|
|
var B2 = require('B.js');
|
2016-12-23 22:31:38 +03:00
|
|
|
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var C = require('package_with_full_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var D = require('package_with_partial_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var E = require('package_with_no_package_json');
|
2016-12-23 22:31:38 +03:00
|
|
|
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
|
|
|
|
2017-02-22 00:59:19 +03:00
|
|
|
var F = require('package_with_dir_main');
|
2016-12-23 22:31:38 +03:00
|
|
|
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2016-12-23 22:31:38 +03:00
|
|
|
/* @flow */
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2016-12-23 22:31:38 +03:00
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-04-12 23:41:51 +03:00
|
|
|
var B1 = require("B");
|
2017-01-26 22:57:43 +03:00
|
|
|
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-01-10 05:49:06 +03:00
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-04-12 23:41:51 +03:00
|
|
|
var B2 = require("B.js");
|
2017-01-26 22:57:43 +03:00
|
|
|
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var C = require("package_with_full_main");
|
2017-01-26 22:57:43 +03:00
|
|
|
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var D = require("package_with_partial_main");
|
2017-01-26 22:57:43 +03:00
|
|
|
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var E = require("package_with_no_package_json");
|
2017-01-26 22:57:43 +03:00
|
|
|
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var F = require("package_with_dir_main");
|
2017-01-26 22:57:43 +03:00
|
|
|
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-01-10 05:49:06 +03:00
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-04-12 23:41:51 +03:00
|
|
|
var B1 = require("B");
|
2017-01-26 22:57:43 +03:00
|
|
|
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-01-10 05:49:06 +03:00
|
|
|
// This will require ./node_modules/B.js.flow
|
2017-04-12 23:41:51 +03:00
|
|
|
var B2 = require("B.js");
|
2017-01-26 22:57:43 +03:00
|
|
|
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var C = require("package_with_full_main");
|
2017-01-26 22:57:43 +03:00
|
|
|
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var D = require("package_with_partial_main");
|
2017-01-26 22:57:43 +03:00
|
|
|
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var E = require("package_with_no_package_json");
|
2017-01-26 22:57:43 +03:00
|
|
|
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-01-31 19:27:44 +03:00
|
|
|
|
2017-04-12 23:41:51 +03:00
|
|
|
var F = require("package_with_dir_main");
|
2017-01-11 18:16:38 +03:00
|
|
|
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
exports[`test_relative.js 1`] = `
|
|
|
|
====================================options=====================================
|
|
|
|
parsers: ["flow"]
|
|
|
|
printWidth: 80
|
|
|
|
| printWidth
|
|
|
|
=====================================input======================================
|
2017-04-12 23:41:51 +03:00
|
|
|
import { foo } from './A';
|
2016-12-23 22:31:38 +03:00
|
|
|
|
|
|
|
(foo(): boolean); // Error: either Implementation ~> boolean or Definition ~> boolean
|
2018-11-25 11:21:14 +03:00
|
|
|
|
|
|
|
=====================================output=====================================
|
2017-04-12 23:41:51 +03:00
|
|
|
import { foo } from "./A";
|
2017-01-10 05:49:06 +03:00
|
|
|
|
2017-01-11 18:16:38 +03:00
|
|
|
(foo(): boolean); // Error: either Implementation ~> boolean or Definition ~> boolean
|
2017-04-12 23:41:51 +03:00
|
|
|
|
2018-11-25 11:21:14 +03:00
|
|
|
================================================================================
|
2016-12-23 22:31:38 +03:00
|
|
|
`;
|