Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
createDomain/negotiateForwardPropertySpec/negotiateExisting.js
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,21 @@ | ||
var a = require('a'); | ||
|
||
function act(c){ | ||
c.mock = a.mock; | ||
c.requireMock = a.requireMock; | ||
c.expectRequire = a.expectRequire; | ||
c.then = a.then; | ||
|
||
c.newDomain = {}; | ||
c.oldDomain = {}; | ||
|
||
c.oldFoo = {}; | ||
c.existingFoo = {}; | ||
c.oldDomain.foo = c.oldFoo; | ||
c.newDomain.foo = c.existingFoo; | ||
c.propertyName = 'foo'; | ||
|
||
require('../negotiateForwardProperty')(c.oldDomain, c.newDomain, c.propertyName); | ||
} | ||
|
||
module.exports = act; |
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,20 @@ | ||
var a = require('a'); | ||
|
||
function act(c){ | ||
c.mock = a.mock; | ||
c.requireMock = a.requireMock; | ||
c.expectRequire = a.expectRequire; | ||
c.then = a.then; | ||
|
||
c.newDomain = {}; | ||
c.oldDomain = {}; | ||
|
||
c.oldRdb = {}; | ||
c.oldDomain.rdb = c.oldRdb; | ||
c.propertyName = 'rdb'; | ||
|
||
require('../negotiateForwardProperty')(c.oldDomain, c.newDomain, c.propertyName); | ||
|
||
} | ||
|
||
module.exports = act; |
7 changes: 0 additions & 7 deletions
7
createDomain/negotiateForwardPropertySpec/whenExecuteShouldForward.js
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
createDomain/negotiateForwardPropertySpec/whenNegotiateExisting.js
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,5 @@ | ||
var when = require('a').when; | ||
var c = {}; | ||
|
||
when(c) | ||
.it('should not forward existing').assertEqual(c.newDomain.foo, c.existingFoo) |
6 changes: 6 additions & 0 deletions
6
createDomain/negotiateForwardPropertySpec/whenNegotiateFoo.js
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,6 @@ | ||
var when = require('a').when; | ||
var c = {}; | ||
|
||
when(c) | ||
.it('should forward property getter through new domain').assertEqual(c.oldFoo, c.originalValue) | ||
.it('should update value on old domain when setting on new domain').assertEqual(c.newFoo, c.oldDomain.foo) |
5 changes: 5 additions & 0 deletions
5
createDomain/negotiateForwardPropertySpec/whenNegotiateRdb.js
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,5 @@ | ||
var when = require('a').when; | ||
var c = {}; | ||
|
||
when(c) | ||
.it('should not forward rdb').assertNotEqual(c.oldDomain.rdb, c.newDomain.rdb) |
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