aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThanh Vuong <thanhvg@gmail.com>2019-08-17 11:01:51 -0600
committerThanh Vuong <thanhvg@gmail.com>2019-08-17 11:01:51 -0600
commitb093cdf22b034f189dec955dd5bf0fbe69ff2704 (patch)
tree1d0be42669a03363885aabf1225d2e8621cffb6c /test
parent40eb75bbcf0c0ee7f0432b455fa0b3590059b522 (diff)
testing, void variable resolve
Diffstat (limited to 'test')
-rw-r--r--test/emacs-hnreader-test.el11
-rw-r--r--test/test-helper.el15
2 files changed, 26 insertions, 0 deletions
diff --git a/test/emacs-hnreader-test.el b/test/emacs-hnreader-test.el
new file mode 100644
index 0000000..a2d40d6
--- /dev/null
+++ b/test/emacs-hnreader-test.el
@@ -0,0 +1,11 @@
+;;; emacs-hnreader-test.el --- Tests for emacs-hnreader
+(ert-deftest-async test/promise-dom (done)
+ (promise-done
+ (promise-chain
+ (hnreader--promise-dom "https://www.google.com")
+ (then (lambda (result)
+ (should (listp result))
+ ;; (message "%s" result)
+ (funcall done)))
+ (promise-catch done))))
+;;; emacs-hnreader-test.el ends here
diff --git a/test/test-helper.el b/test/test-helper.el
new file mode 100644
index 0000000..c0119bf
--- /dev/null
+++ b/test/test-helper.el
@@ -0,0 +1,15 @@
+;;; test-helper.el --- Helpers for emacs-hnreader-test.el
+(require 'f)
+(require 'ert-async)
+
+(defvar root-test-path
+ (f-dirname (f-this-file)))
+
+(defvar root-code-path
+ (f-parent root-test-path))
+
+(add-to-list 'load-path root-code-path)
+
+(require 'hnreader)
+
+;;; test-helper.el ends here