From 316c76172b4d95fd278a36f5834b9aa5befd87f9 Mon Sep 17 00:00:00 2001 From: Brian Ng Date: Mon, 22 May 2017 17:54:20 -0500 Subject: [PATCH] Add test for flow class field override (#1669) --- .../__snapshots__/jsfmt.spec.js.snap | 12 ++++++++++++ tests/flow_class_field/jsfmt.spec.js | 1 + tests/flow_class_field/override.js | 3 +++ 3 files changed, 16 insertions(+) create mode 100644 tests/flow_class_field/__snapshots__/jsfmt.spec.js.snap create mode 100644 tests/flow_class_field/jsfmt.spec.js create mode 100644 tests/flow_class_field/override.js diff --git a/tests/flow_class_field/__snapshots__/jsfmt.spec.js.snap b/tests/flow_class_field/__snapshots__/jsfmt.spec.js.snap new file mode 100644 index 000000000..27a12d75f --- /dev/null +++ b/tests/flow_class_field/__snapshots__/jsfmt.spec.js.snap @@ -0,0 +1,12 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`override.js 1`] = ` +class Foo { + constructor: () => this; +} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +class Foo { + constructor: () => this; +} + +`; diff --git a/tests/flow_class_field/jsfmt.spec.js b/tests/flow_class_field/jsfmt.spec.js new file mode 100644 index 000000000..1840e9d36 --- /dev/null +++ b/tests/flow_class_field/jsfmt.spec.js @@ -0,0 +1 @@ +run_spec(__dirname, null, ["babylon"]); diff --git a/tests/flow_class_field/override.js b/tests/flow_class_field/override.js new file mode 100644 index 000000000..1db4f6088 --- /dev/null +++ b/tests/flow_class_field/override.js @@ -0,0 +1,3 @@ +class Foo { + constructor: () => this; +}