• This project
    • Loading...
  • Sign in

강희주 / Music_Recommendation_Website

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • Music_Recommendation_Website
  • node_modules
  • read-only-stream
  • test
  • ro.js
  • 강희주's avatar
    Update package.json · 451b6e22
    451b6e22
    강희주 authored 2022-06-09 00:32:19 +0900
ro.js 461 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
var test = require('tape');
var readonly = require('../');
var through = require('through2');
var concat = require('concat-stream');

test('readonly', function (t) {
    t.plan(2);
    
    var stream = through();
    stream.write('woo');
    
    var ro = readonly(stream);
    ro.pipe(concat(function (body) {
        t.equal(body.toString('utf8'), 'woo');
    }));
    
    t.throws(function () {
        ro.write('beep');
    });
    
    stream.end();
});