emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/typescript-mode 039d122384 156/222: add a test for simple


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 039d122384 156/222: add a test for simple tsx
Date: Sun, 6 Feb 2022 16:59:28 -0500 (EST)

branch: elpa/typescript-mode
commit 039d122384fb0663111de3f80342a99b6bfaca03
Author: tam5 <arimiller92@gmail.com>
Commit: tam5 <arimiller92@gmail.com>

    add a test for simple tsx
---
 Dockerfile                       | 14 ++++++++++++++
 README.md                        | 11 +++++++++++
 typescript-mode-general-tests.el |  6 ++++++
 3 files changed, 31 insertions(+)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000000..caadcd3870
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,14 @@
+FROM ubuntu:bionic
+
+RUN apt-get update && \
+  apt-get install -y \
+  make curl python git emacs
+
+RUN curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python
+ENV PATH="/root/.cask/bin:${PATH}"
+
+RUN mkdir -p /home/typescript.el
+COPY . /home/typescript.el
+WORKDIR /home/typescript.el
+
+CMD ["make", "test"]
diff --git a/README.md b/README.md
index 0cb72633b2..8e9a221d36 100644
--- a/README.md
+++ b/README.md
@@ -50,6 +50,17 @@ to `false`: `tsc --pretty false`. However, doing this does 
more than
 just turning off the colors. It also causes `tsc` to produce less
 elaborate error messages.
 
+# Contributing
+
+To run the tests you can run `make test`.
+
+If you prefer, you may run the tests via the provided `Dockerfile`.
+
+```bash
+docker build -t typescript.el .
+docker run --rm -v $(pwd):/home/typescript.el typescript.el
+```
+
 # Other Typescript-packages of interest
 
 While `typescript.el` may *not* provide a full kitchen-sink, the good
diff --git a/typescript-mode-general-tests.el b/typescript-mode-general-tests.el
index 7185a3643a..2c022cc1e3 100644
--- a/typescript-mode-general-tests.el
+++ b/typescript-mode-general-tests.el
@@ -349,6 +349,12 @@ function foo<Z, Y, Z & Y, Z | Y | Z, Y<X<X, Y>>>()\n"
       (("Z" "Y" "X") . font-lock-type-face)
       (("<" ">" "," "&" "|") . nil))))
 
+(ert-deftest font-lock/tsx ()
+  "Tests that tsx blocks are not considered generics by virtue of the <."
+  (font-lock-test
+   "<div>test</div>"
+   '((("div" . nil)))))
+
 (ert-deftest font-lock/regexp ()
   "Regular expresssions should be fontified as string constant."
   (let ((content "=/foo/ (/bar/ ,/baz/ :/buzz/"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]