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

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

[nongnu] elpa/typescript-mode ab6d105807 076/222: Add regression tests f


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode ab6d105807 076/222: Add regression tests for function name highlighting.
Date: Sun, 6 Feb 2022 16:59:19 -0500 (EST)

branch: elpa/typescript-mode
commit ab6d1058079cc6881c9d25141d9939ba42026d94
Author: Jack Williams <jw@jackw.io>
Commit: Jostein Kjønigsen <jostein@kjonigsen.net>

    Add regression tests for function name highlighting.
---
 typescript-mode-tests.el | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/typescript-mode-tests.el b/typescript-mode-tests.el
index 9c57a9a098..01039e7db5 100644
--- a/typescript-mode-tests.el
+++ b/typescript-mode-tests.el
@@ -256,6 +256,19 @@ new line after the start of '/**'."
      ("@param" . typescript-jsdoc-tag)
      ("meow" . typescript-jsdoc-value))))
 
+(ert-deftest font-lock/function-definition-prefixes ()
+  "Tests that function names are highlighted in definitions, even
+when prefixed with module modifiers."
+  (font-lock-test
+   "function basicDefn(x: number, y: string): boolean {}\n
+export function exportedDefn(x: number, y: string): boolean {}\n
+export default function exportedDefaultDefn(x: number, y: string): boolean {}\n
+declare function declareFunctionDefn(x: number, y: string): boolean;"
+   '(("basicDefn" . font-lock-function-name-face)
+     ("exportedDefn" . font-lock-function-name-face)
+     ("exportedDefaultDefn" . font-lock-function-name-face)
+     ("declareFunctionDefn" . font-lock-function-name-face))))
+
 (defun flyspell-predicate-test (search-for)
   "This function runs a test on
 `typescript--flyspell-mode-predicate'.  `SEARCH-FOR' is a string



reply via email to

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