summaryrefslogtreecommitdiff
path: root/node_modules/ldjson-stream/test.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/ldjson-stream/test.js
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/ldjson-stream/test.js')
-rw-r--r--node_modules/ldjson-stream/test.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/node_modules/ldjson-stream/test.js b/node_modules/ldjson-stream/test.js
deleted file mode 100644
index 9a2da0e1..00000000
--- a/node_modules/ldjson-stream/test.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var test = require('tape')
-var ldj = require('./')
-var os = require('os')
-
-test('.parse', function(t) {
- var parser = ldj.parse()
- parser.on('data', function(obj) {
- t.equal(obj.hello, 'world')
- t.end()
- })
-
- parser.write('{"hello": "world"}\n')
-})
-
-test('.parse twice', function(t) {
- var parser = ldj.parse()
- parser.once('data', function(obj) {
- t.equal(obj.hello, 'world')
- parser.once('data', function(obj) {
- t.equal(obj.hola, 'mundo')
- t.end()
- })
- })
-
- parser.write('{"hello": "world"}\n{"hola": "mundo"}\n')
-})
-
-test('.serialize', function(t) {
- var serializer = ldj.serialize()
- serializer.on('data', function(data) {
- t.equal(data, '{"hello":"world"}' + os.EOL)
- t.end()
- })
- serializer.write({hello: 'world'})
-})