#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

spec_it () {
  assert_ok "$FLOW" autofix insert-type --in-place "$@"
}

spec_it a.js 8 9
spec_it a.js 10 9
spec_it a.js 12 9
spec_it a.js 14 9
spec_it a.js 16 19
spec_it a.js 18 19
spec_it a.js 20 19
spec_it a.js 22 17
spec_it a.js 24 15
spec_it a.js 26 9
spec_it a.js 28 9
spec_it a.js 31 19
spec_it a.js 33 9
spec_it a.js 35 9
spec_it a.js 38 19
spec_it a.js 40 14
spec_it a.js 42 31
spec_it a.js 46 9


echo "> cat a.js"
cat a.js
assert_ok "$FLOW" force-recheck a.js

echo "> flow status"
assert_ok "$FLOW" status
