Created
August 17, 2010 19:54
-
-
Save zzen/531709 to your computer and use it in GitHub Desktop.
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
test('My First Test', [ | |
on('GET /test').return('{"result":"something"', {status:200,SetCookie:"abcdefgh..."}).parse('$id',/^xxx/), | |
on('GET /lorem/$id').return('{"result":"something"', {status:200,SetCookie:"abcdefgh..."}) | |
]); | |
suite('TestGrid self-hoist suite', [ | |
test('create new test suite', | |
on('POST /suites', | |
"suite('new suite',[test('new test'),on('GET /').result('<html></html>')" | |
).result( | |
{uri: '/suites/$id{\d+}'} | |
) | |
), | |
test('edit test', | |
on('GET /suites'). | |
result([$testId#{\d+}]). | |
on('POST $testId1, "test('edited test','on(\"GET /\").result(\"<html></html>\")')"). | |
result(null,{status:200}) | |
) | |
]) |
on('POST /object', {data:123}).result({uri: '/object/$id{###}'})
.on("GET /object/$id").result({data:123, self: /object/$id})
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the style: