-
Notifications
You must be signed in to change notification settings - Fork 47.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Noop Module Test Helpers to top level entry points
This module has shared state. It needs to be external from builds. This lets us test the built versions of the Noop renderer.
- Loading branch information
1 parent
da758b1
commit b5c62c8
Showing
6 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict'; | ||
|
||
// This file is used as temporary storage for modules generated in Flight tests. | ||
var moduleIdx = 0; | ||
var modules = new Map(); | ||
|
||
// This simulates what the compiler will do when it replaces render functions with server blocks. | ||
exports.saveModule = function saveModule(render) { | ||
var idx = '' + moduleIdx++; | ||
modules.set(idx, render); | ||
return idx; | ||
}; | ||
|
||
exports.readModule = function readModule(idx) { | ||
return modules.get(idx); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
"persistent.js", | ||
"server.js", | ||
"flight-client.js", | ||
"flight-modules.js", | ||
"flight-server.js", | ||
"cjs/" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters