Skip to content

Commit e6a2193

Browse files
authored
test: update internal module references and add flags for tests
1 parent e6335e0 commit e6a2193

20 files changed

Lines changed: 45 additions & 22 deletions

test/async-hooks/test-httpparser.request.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Flags: --expose-internals --no-warnings
2+
13
'use strict';
24

35
const common = require('../common');
@@ -9,7 +11,7 @@ const { checkInvocations } = require('./hook-checks');
911
const hooks = initHooks();
1012
hooks.enable();
1113

12-
const { HTTPParser } = require('_http_common');
14+
const { HTTPParser } = require('internal/http/common');
1315

1416
const REQUEST = HTTPParser.REQUEST;
1517

test/async-hooks/test-httpparser.response.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Flags: --expose-internals --no-warnings
2+
13
'use strict';
24

35
const common = require('../common');
@@ -10,7 +12,7 @@ const hooks = initHooks();
1012

1113
hooks.enable();
1214

13-
const { HTTPParser } = require('_http_common');
15+
const { HTTPParser } = require('internal/http/common');
1416

1517
const RESPONSE = HTTPParser.RESPONSE;
1618
const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0;

test/parallel/test-http-agent-keepalive-delay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const common = require('../common');
44
const assert = require('assert');
55
const http = require('http');
6-
const { Agent } = require('_http_agent');
6+
const { Agent } = require('http');
77

88
const agent = new Agent({
99
keepAlive: true,

test/parallel/test-http-agent-keepalive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
const common = require('../common');
2424
const assert = require('assert');
2525
const http = require('http');
26-
const Agent = require('_http_agent').Agent;
26+
const Agent = require('http').Agent;
2727

2828
let name;
2929

test/parallel/test-http-common.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// Flags: --expose-internals --no-warnings
2+
13
'use strict';
24
require('../common');
35
const assert = require('assert');
4-
const httpCommon = require('_http_common');
6+
const httpCommon = require('internal/http/common');
57
const checkIsHttpToken = httpCommon._checkIsHttpToken;
68
const checkInvalidHeaderChar = httpCommon._checkInvalidHeaderChar;
79

test/parallel/test-http-invalidheaderfield2.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
// Flags: --expose-internals --no-warnings
2+
13
'use strict';
24
require('../common');
35
const assert = require('assert');
46
const inspect = require('util').inspect;
5-
const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('_http_common');
7+
const { _checkIsHttpToken, _checkInvalidHeaderChar } = require('internal/http/common');
68

79
// Good header field names
810
[

test/parallel/test-http-parser-bad-ref.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Run this program with valgrind or efence with --expose_gc to expose the
33
// problem.
44

5-
// Flags: --expose_gc
5+
// Flags: --expose_gc --expose-internals --no-warnings
66

77
require('../common');
88
const assert = require('assert');
9-
const { HTTPParser } = require('_http_common');
9+
const { HTTPParser } = require('internal/http/common');
1010

1111
const kOnHeaders = HTTPParser.kOnHeaders | 0;
1212
const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0;

test/parallel/test-http-parser-lazy-loaded.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ binding.HTTPParser = DummyParser;
2020

2121
const assert = require('assert');
2222
const { spawn } = require('child_process');
23-
const { parsers } = require('_http_common');
23+
const { parsers } = require('internal/http/common');
2424

2525
// Test _http_common was not loaded before monkey patching
2626
const parser = parsers.alloc();

test/parallel/test-http-parser-memory-retention.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// Flags: --expose-internals --no-warnings
12
'use strict';
23

34
const common = require('../common');
45
const assert = require('assert');
56
const http = require('http');
6-
const { HTTPParser } = require('_http_common');
7+
const { HTTPParser } = require('internal/http/common');
78

89
// Test that the `HTTPParser` instance is cleaned up before being returned to
910
// the pool to avoid memory retention issues.

test/parallel/test-http-parser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Flags: --expose-internals --no-warnings
2+
13
// Copyright Joyent, Inc. and other Node contributors.
24
//
35
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,7 +25,7 @@
2325
const { mustCall, mustNotCall } = require('../common');
2426
const assert = require('assert');
2527

26-
const { methods, HTTPParser } = require('_http_common');
28+
const { methods, HTTPParser } = require('internal/http/common');
2729
const { REQUEST, RESPONSE } = HTTPParser;
2830

2931
const kOnHeaders = HTTPParser.kOnHeaders | 0;

0 commit comments

Comments
 (0)