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

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

[nongnu] elpa/typescript-mode 47b7fd239e 214/222: add a test for error t


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 47b7fd239e 214/222: add a test for error thrown if typescript-mode is loaded with lexical scoping enabled
Date: Sun, 6 Feb 2022 16:59:33 -0500 (EST)

branch: elpa/typescript-mode
commit 47b7fd239e8596b45b90549721bbf6adfcae9642
Author: Platon Pronko <platon7pronko@gmail.com>
Commit: Platon Pronko <platon7pronko@gmail.com>

    add a test for error thrown if typescript-mode is loaded with lexical 
scoping enabled
---
 typescript-mode-lexical-binding-tests.el | 25 +++++++++++++++++++++++++
 typescript-mode-tests.el                 |  1 +
 2 files changed, 26 insertions(+)

diff --git a/typescript-mode-lexical-binding-tests.el 
b/typescript-mode-lexical-binding-tests.el
new file mode 100644
index 0000000000..9f217e3caa
--- /dev/null
+++ b/typescript-mode-lexical-binding-tests.el
@@ -0,0 +1,25 @@
+;; -*- lexical-binding: t -*-
+;;; typescript-mode-lexical-binding-tests --- This file contains test for 
typescript-mode.el under enabled lexical-binding
+
+;;; Commentary:
+;; To know how to run the tests, see typescript-mode-tests.el
+
+(require 'ert)
+
+;; reload typescript-mode with lexical-binding enabled
+(with-temp-buffer
+  (insert-file-contents "typescript-mode.el")
+  (ignore-errors
+    (while (setq sexp (read (current-buffer)))
+      (eval sexp t))))
+
+(require 'typescript-mode-test-utilities)
+
+(ert-deftest lexical-binding--indentation-does-not-throw-error ()
+  (with-temp-buffer
+    (insert-file-contents "test-files/indentation-reference-document.ts")
+    (typescript-mode)
+    (goto-line 2)
+    (typescript-indent-line)))
+
+(provide 'typescript-mode-lexical-binding-tests)
diff --git a/typescript-mode-tests.el b/typescript-mode-tests.el
index 1c8aa75fa2..7ff8b212fe 100644
--- a/typescript-mode-tests.el
+++ b/typescript-mode-tests.el
@@ -11,6 +11,7 @@
 (require 'typescript-mode-test-utilities)
 (require 'typescript-mode-general-tests)
 (require 'typescript-mode-jsdoc-tests)
+(require 'typescript-mode-lexical-binding-tests)
 
 (provide 'typescript-mode-tests)
 



reply via email to

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