Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 524B

12345678910111213141516171819202122232425262728293031
  1. var through = require("through")
  2. var test = require("tape")
  3. var duplex = require("../index")
  4. var readable = through()
  5. var writable = through(write)
  6. var written = 0
  7. var data = 0
  8. var stream = duplex(writable, readable)
  9. function write() {
  10. written++
  11. }
  12. stream.on("data", ondata)
  13. function ondata() {
  14. data++
  15. }
  16. test("emit and write", function(t) {
  17. t.plan(2)
  18. stream.write()
  19. readable.emit("data")
  20. t.equal(written, 1, "should have written once")
  21. t.equal(data, 1, "should have recived once")
  22. })