Skip to content

Commit f2ce5bb

Browse files
committed
purescript + node updates
1 parent c0458a5 commit f2ce5bb

File tree

5 files changed

+75
-3
lines changed

5 files changed

+75
-3
lines changed

languages/ml/purescript/articles.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- https://thomashoneyman.com/articles/
12
- intro tutorial
23
- Why You Should Use PureScript https://gist.github.com/paf31/adfd15fbb1ac8b99fc68be2c9aca8427
34
- https://speakerdeck.com/michaelficarra/getting-started-with-purescript

languages/ml/purescript/books.org

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
- react/next.js based https://alethic.art/
2+
- https://thomashoneyman.com/guides/real-world-halogen/
13
- https://leanpub.com/purescript/read
4+
- Functional programming made easy
25
- book
36
https://github.com/JordanMartinez/purescript-jordans-reference
47
https://jordanmartinez.github.io/purescript-jordans-reference-site/

languages/ml/purescript/self.org

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,17 @@ isEmpty _ = false
7777
- Data.List ((:), List(..), reverse, filter, concat, concatMap)
7878
- Data.Maybe (Maybe(..))
7979
- Partial.Unsafe (unsafePartial)
80+
81+
* tools
82+
83+
- spago: package manager / build https://github.com/purescript/spago
84+
- pursuit: documentation + hoogle https://pursuit.purescript.org/
85+
- editor: linter
86+
- https://github.com/natefaubion/purescript-tidy
87+
- editor: ide integration
88+
- https://github.com/purescript/documentation/blob/master/ecosystem/Editor-and-tool-support.md
89+
- lsp https://github.com/nwolverson/purescript-language-server
90+
91+
* codebases
92+
- react https://github.com/jonasbuntinx/purescript-react-realworld
93+
- halogen https://github.com/thomashoneyman/purescript-halogen-realworld

languages/web/js/node/libraries.org

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,56 @@
2424
| *blessed | ncurses | https://github.com/chjj/blessed | 11 |
2525
|-------------+----------------------+------------------------------------+----|
2626
*ABANDONED
27+
* Testing
28+
29+
- testing frameworks
30+
- mocha - [[https://mochajs.org/][home]] [[https://github.com/mochajs/mocha][source]]
31+
- jest - [[https://jestjs.io/][home]] [[https://github.com/jestjs/jest][source]]
32+
33+
- assertion libraries
34+
- should.js
35+
- expect.js
36+
- chai [[https://www.chaijs.com/][home]] [[https://github.com/chaijs/chai][source]]
37+
- better-assert
38+
- unexpected
39+
40+
- http test libraries/assertions
41+
- chai-http [[https://www.npmjs.com/package/chai-http][npm]]
42+
- supertest [[https://github.com/forwardemail/supertest][source]] [[https://www.npmjs.com/package/supertest][npm]]
43+
44+
- to test express, export both
45+
- the app
46+
- and the server (what app.listen() returns)
47+
48+
** mocha / describe,it,assert
49+
50+
- test/
51+
- --exit
52+
- .mocharc.json
53+
54+
#+begin_src js
55+
before((done) => {});
56+
after((done) => {});
57+
describe('Array', () => {
58+
describe('#indexOf()', () => {
59+
it('should return -1 the values is not present', () => {
60+
assert.equal([1,2,3].indexOf(4),-1);
61+
});
62+
});
63+
});
64+
#+end_src
65+
66+
** jest / test,expect
67+
68+
- --verbose
69+
- --silent do not return console.log() in terminal
70+
- --detectOpenHandles
71+
- --watch
72+
73+
#+begin_src js
74+
beforeEach(() => {});
75+
afterAll(()=>{});
76+
test('adds 1 +2 to equal 3', () => {
77+
expect(sum(1,2)).toBe(3);
78+
});
79+
#+end_src

languages/web/js/node/node.org

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
- https://github.com/sindresorhus/awesome-nodejs
1717

18-
- process.argv - array of: path to node, path to script, and the rest of arguments
18+
- NODE_ENV: production, development, test
19+
- cross-env: needed for Windows https://www.npmjs.com/package/cross-env
1920

2021
* imports
2122

@@ -33,10 +34,10 @@
3334
- fileURLtoPath() - in node:path
3435
- dirname() - in node:path
3536

37+
* Standard Modules
3638
- fs
3739
- readFileSync
38-
39-
* Standard Modules
40+
- process.argv - array of: path to node, path to script, and the rest of arguments
4041
- https://www.w3schools.com/nodejs/ref_modules.asp
4142
Here is a list of the built-in modules of Node.js version 6.10.3:
4243
- https://www.w3schools.com/nodejs/ref_fs.asp

0 commit comments

Comments
 (0)