fluentnode
Version:
Fluent apis for node (based on the concepts used in C#'s FluentSharp
303 lines (203 loc) • 11.4 kB
HTML
<html>
<head>
<title>Object.test.coffee</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<link rel="stylesheet" media="all" href="docco.css" />
</head>
<body>
<div id="container">
<div id="background"></div>
<ul id="jump_to">
<li>
<a class="large" href="javascript:void(0);">Jump To …</a>
<a class="small" href="javascript:void(0);">+</a>
<div id="jump_wrapper">
<div id="jump_page">
<a class="source" href="Array.html">
Array.litcoffee
</a>
<a class="source" href="Boolean.html">
Boolean.litcoffee
</a>
<a class="source" href="Function.html">
Function.litcoffee
</a>
<a class="source" href="Number.html">
Number.litcoffee
</a>
<a class="source" href="Object.html">
Object.litcoffee
</a>
<a class="source" href="String.html">
String.litcoffee
</a>
<a class="source" href="_register.html">
_register.js
</a>
<a class="source" href="_to_map_and_write_Tests.html">
_to_map_and_write_Tests.litcoffee
</a>
<a class="source" href="assert_Array.html">
assert_Array.litcoffee
</a>
<a class="source" href="assert_Boolean.html">
assert_Boolean.litcoffee
</a>
<a class="source" href="assert_Function.html">
assert_Function.litcoffee
</a>
<a class="source" href="assert_Number.html">
assert_Number.litcoffee
</a>
<a class="source" href="assert_Object.html">
assert_Object.litcoffee
</a>
<a class="source" href="assert_String.html">
assert_String.litcoffee
</a>
<a class="source" href="console.html">
console.litcoffee
</a>
<a class="source" href="fs.html">
fs.litcoffee
</a>
<a class="source" href="globals.html">
globals.litcoffee
</a>
<a class="source" href="http.html">
http.litcoffee
</a>
<a class="source" href="index.html">
index.md
</a>
<a class="source" href="path.html">
path.litcoffee
</a>
<a class="source" href="process.html">
process.litcoffee
</a>
<a class="source" href="Array.test.html">
Array.test.coffee
</a>
<a class="source" href="Boolean.test.html">
Boolean.test.coffee
</a>
<a class="source" href="Function.test.html">
Function.test.coffee
</a>
<a class="source" href="Number.test.html">
Number.test.coffee
</a>
<a class="source" href="Object.test.html">
Object.test.coffee
</a>
<a class="source" href="String.test.html">
String.test.coffee
</a>
<a class="source" href="Array.test.html">
Array.test.coffee
</a>
<a class="source" href="Boolean.test.html">
Boolean.test.coffee
</a>
<a class="source" href="Function.test.html">
Function.test.coffee
</a>
<a class="source" href="Number.test.html">
Number.test.coffee
</a>
<a class="source" href="Object.test.html">
Object.test.coffee
</a>
<a class="source" href="String.test.html">
String.test.coffee
</a>
<a class="source" href="console.test.html">
console.test.coffee
</a>
<a class="source" href="fs.test.html">
fs.test.coffee
</a>
<a class="source" href="globals.test.html">
globals.test.coffee
</a>
<a class="source" href="http.test.html">
http.test.coffee
</a>
<a class="source" href="path.test.html">
path.test.coffee
</a>
<a class="source" href="process.test.html">
process.test.coffee
</a>
</div>
</li>
</ul>
<ul class="sections">
<li id="title">
<div class="annotation">
<h1>Object.test.coffee</h1>
</div>
</li>
<li id="section-1">
<div class="annotation">
<div class="pilwrap ">
<a class="pilcrow" href="#section-1">¶</a>
</div>
</div>
<div class="content"><div class='highlight'><pre><span class="hljs-built_in">require</span>(<span class="hljs-string">'../../src/assert/assert_Object'</span>)
describe <span class="hljs-string">'Assert | Object'</span>, <span class="hljs-function">-></span>
it <span class="hljs-string">'assert_Is_Equal_To, assert_Is'</span>, <span class="hljs-function">-></span>
<span class="hljs-string">''</span>.assert_Is_Equal_To.assert_Is_Function()
<span class="hljs-string">'{}'</span>.assert_Is_Equal_To(<span class="hljs-string">'{}'</span>)
{}.assert_Is_Equal_To({})
{<span class="hljs-string">'a'</span>}.assert_Is_Equal_To({<span class="hljs-string">'a'</span>})
<span class="hljs-string">'12'</span>.assert_Is_Equal_To(<span class="hljs-string">'12'</span>)
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Is(<span class="hljs-string">'12'</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Is(<span class="hljs-string">'42'</span>)).assert_Throws()
it <span class="hljs-string">'assert_Is_Instance_Of, assert_Instance_Of'</span>, <span class="hljs-function">-></span>
<span class="hljs-string">''</span>.assert_Is_Instance_Of.assert_Is_Function()
<span class="hljs-string">''</span>.assert_Is_Instance_Of(String)
(<span class="hljs-number">12</span>).assert_Is_Instance_Of(Number)
(<span class="hljs-keyword">new</span> Error()).assert_Is_Instance_Of(Error)
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Instance_Of(String)).assert_Not_Throws()
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Instance_Of(Number)).assert_Throws()
it <span class="hljs-string">'assert_Is_Not_Equal_To, assert_Is_Not'</span>, <span class="hljs-function">-></span>
<span class="hljs-string">''</span>.assert_Is_Not_Equal_To.assert_Is_Function()
<span class="hljs-string">'{}'</span>.assert_Is_Not_Equal_To(<span class="hljs-string">'12'</span>)
<span class="hljs-string">'12'</span>.assert_Is_Not_Equal_To(<span class="hljs-string">'42'</span>)
{<span class="hljs-string">'a'</span>}.assert_Is_Not_Equal_To({<span class="hljs-string">'b'</span>})
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Is_Not(<span class="hljs-string">'42'</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> <span class="hljs-string">'12'</span>.assert_Is_Not(<span class="hljs-string">'12'</span>)).assert_Throws()
it <span class="hljs-string">'assert_Is_Null'</span>, <span class="hljs-function">-></span>
assert_Is_Null.assert_Is_Function();
assert_Is_Null(<span class="hljs-literal">null</span>)
(<span class="hljs-function">-></span> assert_Is_Null(<span class="hljs-literal">null</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> assert_Is_Null(<span class="hljs-string">'123'</span>)).assert_Throws()
it <span class="hljs-string">'assert_Is_Not_Null'</span>, <span class="hljs-function">-></span>
assert_Is_Not_Null.assert_Is_Function();
assert_Is_Not_Null(<span class="hljs-string">'123'</span>)
(<span class="hljs-function">-></span> assert_Is_Not_Null(<span class="hljs-string">'123'</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> assert_Is_Not_Null(<span class="hljs-literal">null</span>)).assert_Throws()
it <span class="hljs-string">'assert_Is_Object'</span>, <span class="hljs-function">-></span>
{}.assert_Is_Object.assert_Is_Function()
{}.assert_Is_Object().assert_Is_Equal_To({})
it <span class="hljs-string">'assert_Is_Undefined'</span>, <span class="hljs-function">-></span>
assert_Is_Undefined.assert_Is_Function();
assert_Is_Undefined(<span class="hljs-literal">undefined</span>)
aaaa = <span class="hljs-literal">undefined</span>
assert_Is_Undefined(aaaa)
(<span class="hljs-function">-></span> assert_Is_Undefined(<span class="hljs-literal">undefined</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> assert_Is_Undefined(<span class="hljs-string">'123'</span>)).assert_Throws()
it <span class="hljs-string">'assert_Is_Not_Undefined'</span>, <span class="hljs-function">-></span>
assert_Is_Not_Undefined.assert_Is_Function();
assert_Is_Not_Undefined(<span class="hljs-string">'123'</span>)
(<span class="hljs-function">-></span> assert_Is_Not_Undefined(<span class="hljs-string">'123'</span>)).assert_Not_Throws()
(<span class="hljs-function">-></span> assert_Is_Not_Undefined(<span class="hljs-literal">undefined</span>)).assert_Throws()</pre></div></div>
</li>
</ul>
</div>
</body>
</html>