test are now working
This commit is contained in:
parent
c0431f5bae
commit
644c05e50b
7 changed files with 56 additions and 6 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -14,4 +14,5 @@ pom.xml.asc
|
||||||
.cpcache/
|
.cpcache/
|
||||||
.shadow-cljs/
|
.shadow-cljs/
|
||||||
node_modules/
|
node_modules/
|
||||||
/public/js
|
/public/js
|
||||||
|
/out
|
|
@ -4,9 +4,12 @@ Embeds mastodon timline into a html page. Uses JS, no intermediate server requir
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
sudo npm i -g npx
|
sudo npm install -g npx
|
||||||
|
sudo npm install -g source-map-support
|
||||||
|
sudo npm install -g shadow-cljs
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
npx shadow-cljs node-repl
|
shadow-cljs node-repl
|
||||||
npx shadow-cljs watch frontend
|
shadow-cljs watch frontend
|
||||||
|
shadow-cljs compile test
|
30
package-lock.json
generated
Normal file
30
package-lock.json
generated
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"name": "dda-masto-embed",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"buffer-from": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"source-map-support": {
|
||||||
|
"version": "0.5.19",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
|
||||||
|
"integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,8 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"shadow-cljs": "2.8.100"
|
"shadow-cljs": "2.8.100",
|
||||||
|
"source-map-support": "^0.5.19"
|
||||||
},
|
},
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
[]
|
[]
|
||||||
:dev-http {8080 "public"}
|
:dev-http {8080 "public"}
|
||||||
:builds
|
:builds
|
||||||
{:frontend
|
{:test
|
||||||
|
{:target :node-test
|
||||||
|
:output-to "out/node-tests.js"
|
||||||
|
:autorun true}
|
||||||
|
:frontend
|
||||||
{:target :browser
|
{:target :browser
|
||||||
:modules {:main {:init-fn dda.masto-embed.app/init}}}}}
|
:modules {:main {:init-fn dda.masto-embed.app/init}}}}}
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
(ns dda.masto-embed.app)
|
(ns dda.masto-embed.app)
|
||||||
|
|
||||||
|
(defn add-one [a]
|
||||||
|
(+ a 1))
|
||||||
|
|
||||||
(defn init
|
(defn init
|
||||||
""
|
""
|
||||||
[]
|
[]
|
||||||
|
|
8
src/test/dda/masto_embed/app_test.cljs
Normal file
8
src/test/dda/masto_embed/app_test.cljs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns dda.masto-embed.app-test
|
||||||
|
(:require
|
||||||
|
[cljs.test :refer (deftest is)]
|
||||||
|
[dda.masto-embed.app :as sut]))
|
||||||
|
|
||||||
|
(deftest a-failing-test
|
||||||
|
(is (= 3
|
||||||
|
(sut/add-one 2))))
|
Loading…
Reference in a new issue