| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a3d0802 commit 775c84e
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,20 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + require('../common'); | ||
| 4 | + const assert = require('assert'); | ||
| 5 | + const debug = require('_debugger'); | ||
| 6 | + | ||
| 7 | + const protocol = new debug.Protocol(); | ||
| 8 | + | ||
| 9 | + assert.strictEqual(protocol.state, 'headers'); | ||
| 10 | + | ||
| 11 | + protocol.execute('Content-Length: 10\r\n\r\nfhqwhgads'); | ||
| 12 | + | ||
| 13 | + assert.strictEqual(protocol.state, 'body'); | ||
| 14 | + assert.strictEqual(protocol.res.body, undefined); | ||
| 15 | + | ||
| 16 | + protocol.state = 'sterrance'; | ||
| 17 | + assert.throws( | ||
| 18 | + () => { protocol.execute('grumblecakes'); }, | ||
| 19 | + /^Error: Unknown state$/ | ||
| 20 | + ); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments