forked from babel/babel
/
e2e-prettier.sh
executable file
路57 lines (42 loc) 路 2.01 KB
/
e2e-prettier.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#==============================================================================#
# SETUP #
#==============================================================================#
# Start in scripts/integration-tests/ even if run from root directory
cd "$(dirname "$0")" || exit
root="$PWD"
source utils/local-registry.sh
source utils/cleanup.sh
# Echo every command being executed
set -x
# Clone prettier
git clone --depth=1 --single-branch --branch next https://github.com/prettier/prettier tmp/prettier
cd tmp/prettier || exit
# Update @babel/* dependencies
bump_deps="$root/utils/bump-babel-dependencies.js"
node "$bump_deps"
#==============================================================================#
# ENVIRONMENT #
#==============================================================================#
node -v
yarn --version
#==============================================================================#
# TEST #
#==============================================================================#
startLocalRegistry "$root"/verdaccio-config.yml
yarn install --no-immutable
yarn info
# Test typings for @babel/parser
yarn lint:typecheck
# https://github.com/babel/babel/pull/14892#issuecomment-1233180626
echo "export default () => () => {}" > src/main/create-print-pre-check-function.js
# https://github.com/babel/babel/pull/15385#issuecomment-1409840781
# Ignore this test until prettier update the snapshot
rm tests/format/js/exports/jsfmt.spec.js
rm tests/format/js/export-extension/jsfmt.spec.js
# https://github.com/babel/babel/pull/15400#issuecomment-1414539133
# Ignore this test until prettier update the snapshot
# because prettier has ignored UnexpectedReservedWord error
rm tests/format/flow-repo/async/await_parse.js
yarn test "tests/format/(jsx?|misc|typescript|flow|flow-repo)/" --update-snapshot --runInBand
cleanup