Skip to content

Commit

Permalink
chore(@formatjs/editor): add test data
Browse files Browse the repository at this point in the history
  • Loading branch information
longlho committed Apr 3, 2021
1 parent c77095d commit 5321b4f
Show file tree
Hide file tree
Showing 12 changed files with 45,504 additions and 74 deletions.
9 changes: 9 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("@bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
load("@com_github_ash2k_bazel_tools//multirun:def.bzl", "multirun")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@npm//karma:index.bzl", "karma_test")
load("//tools:index.bzl", "BUILDIFIER_WARNINGS")

Expand All @@ -21,6 +22,13 @@ exports_files(
visibility = ["//:__subpackages__"],
)

ts_config(
name = "tsconfig.esm",
src = "tsconfig.esm.json",
visibility = ["//:__subpackages__"],
deps = ["//:tsconfig.json"],
)

# We run this centrally so it doesn't spawn
# multiple browser sessions which overwhelms SauceLabs
KARMA_TESTS = [
Expand Down Expand Up @@ -84,6 +92,7 @@ multirun(
"//packages/babel-plugin-formatjs:prettier",
"//packages/cli:prettier",
"//packages/ecma402-abstract:prettier",
"//packages/editor:prettier",
"//packages/eslint-plugin-formatjs:prettier",
"//packages/icu-messageformat-parser:prettier",
"//packages/intl-datetimeformat:prettier",
Expand Down
41 changes: 41 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"@docusaurus/theme-live-codeblock": "2.0.0-alpha.72",
"@jest/transform": "^26.6.2",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
"@testing-library/jest-dom": "^5.11.5",
"@testing-library/react": "^11.1.1",
"@types/babel__core": "^7.1.7",
Expand Down
20 changes: 10 additions & 10 deletions packages/editor/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
load("@build_bazel_rules_nodejs//:index.bzl", "generated_file_test", "pkg_npm", "copy_to_bin")
load("//tools:index.bzl", "check_format", "ts_compile", "esbuild")
load("//tools:jest.bzl", "jest_test")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "generated_file_test", "pkg_npm")

# load("//tools:jest.bzl", "jest_test")
load("@npm//http-server:index.bzl", "http_server")
load("//tools:index.bzl", "check_format", "esbuild", "ts_compile")

PACKAGE_NAME = "editor"

pkg_npm(
Expand Down Expand Up @@ -32,19 +34,21 @@ SRCS = glob(["*.ts*"])
SRC_DEPS = [
"@npm//@material-ui/core",
"@npm//@material-ui/icons",
"@npm//@material-ui/lab",
"@npm//react",
"@npm//@types/react",
"@npm//react-dom",
"@npm//@types/react-dom",
"//packages/react-intl:dist"
"//packages/react-intl:dist",
"//packages/intl-messageformat-parser:dist",
]

ts_compile(
name = "dist",
package_name = "@formatjs/%s" % PACKAGE_NAME,
srcs = SRCS,
skip_esm = False,
deps = SRC_DEPS,
skip_esm=False,
)

# jest_test(
Expand Down Expand Up @@ -77,9 +81,6 @@ check_format(
],
exclude = [
"CHANGELOG.md",
# Intentional err
"tests/extract/typescript/err.tsx",
"tests/*/__snapshots__/*",
],
),
)
Expand All @@ -92,7 +93,6 @@ esbuild(
entry_point = "lib/main.js",
format = "iife",
deps = [":dist-esm"] + SRC_DEPS + [

],
)

Expand All @@ -106,7 +106,7 @@ http_server(
data = [
":index",
":app",
],
] + glob(["fixtures/*.json"]),
templated_args = [
"packages/editor",
],
Expand Down
Loading

0 comments on commit 5321b4f

Please sign in to comment.