Files
test-repo/tests/declaration_files_incremental_node/test_absolute.js
T
Christopher Chedeau cf45afba61 Add testing
- This brings in the flow test suite that contains a ton of JavaScript parsing edge cases
- This creates snapshot tests using the pretty printer for all of them
- If uncomment `RUN_AST_TESTS` line in `tests/run_specs.js`, it checks ast(pretty_print(x)) == ast(x). Right now, "178 failed, 197 passed, 375 of 377 total". So half of the tests are not passing, most of them are crashes and many of the rest are subtle issues.
2016-12-23 19:51:53 +00:00

42 lines
1.7 KiB
JavaScript

/* @flow */
// This will require ./node_modules/B.js.flow
var B1 = require('B');
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
// This will require ./node_modules/B.js.flow
var B2 = require('B.js');
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var C = require('package_with_full_main');
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var D = require('package_with_partial_main');
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var E = require('package_with_no_package_json');
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var F = require('package_with_dir_main');
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
// This will require ./node_modules/B.js.flow
var B1 = require('B');
(B1.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
// This will require ./node_modules/B.js.flow
var B2 = require('B.js');
(B2.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var C = require('package_with_full_main');
(C.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var D = require('package_with_partial_main');
(D.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var E = require('package_with_no_package_json');
(E.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean
var F = require('package_with_dir_main');
(F.fun(): boolean); // Error either Implementation ~> boolean or Declaration ~> boolean