forked from jsdom/jsdom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test/api] added env export to easily set up a dom+resource environme…
…nt/closure, detatched tests added not complete
- Loading branch information
hij1nx
committed
Feb 10, 2011
1 parent
adea6d6
commit 46f149c
Showing
3 changed files
with
72 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>hello, Node.js!</title> | ||
</head> | ||
<body> | ||
</body> | ||
</html> |
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 jsdom = require("../lib/jsdom"); | ||
|
||
jsdom.env({ | ||
|
||
scripts: ['/../example/jquery/jquery.js'], | ||
document: '/../test/env.html' | ||
|
||
}, | ||
|
||
function(window) { | ||
|
||
var $ = window.jQuery; | ||
|
||
$("body").html("Let's Rock!") | ||
|
||
console.log($('html').html()); | ||
|
||
} | ||
|
||
); |