Add editorconfig, resolve differences
This includes newlines, tabs, among other things.
This commit is contained in:
parent
80d0a69dab
commit
b4fb21475c
90 changed files with 1707 additions and 1701 deletions
|
|
@ -4,9 +4,9 @@
|
|||
<body>
|
||||
<script src="../../module/module.js"></script>
|
||||
<script src="../../test-utils/callAsync.js"></script>
|
||||
|
||||
|
||||
<script src="../../ospec/ospec.js"></script>
|
||||
<script src="test-ospec.js"></script>
|
||||
<script>require("../../ospec/ospec").run()</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -21,22 +21,22 @@ new function(o) {
|
|||
o.spec("ospec", function() {
|
||||
o.spec("sync", function() {
|
||||
var a = 0, b = 0
|
||||
|
||||
|
||||
o.before(function test() {a = 1})
|
||||
o.after(function test() {a = 0})
|
||||
|
||||
|
||||
o.beforeEach(function test() {b = 1})
|
||||
o.afterEach(function test() {b = 0})
|
||||
|
||||
|
||||
o("assertions", function test() {
|
||||
var spy = o.spy()
|
||||
spy(a)
|
||||
|
||||
|
||||
o(a).equals(b)
|
||||
o(a).notEquals(2)
|
||||
o({a: [1, 2], b: 3}).deepEquals({a: [1, 2], b: 3})
|
||||
o([{a: 1, b: 2}, {c: 3}]).deepEquals([{a: 1, b: 2}, {c: 3}])
|
||||
|
||||
|
||||
var values = ["a", "", 1, 0, true, false, null, undefined, Date(0), ["a"], [], function() {return arguments}.call(), new Uint8Array(), {a: 1}, {}]
|
||||
for (var i = 0; i < values.length; i++) {
|
||||
for (var j = 0; j < values.length; j++) {
|
||||
|
|
@ -44,7 +44,7 @@ o.spec("ospec", function() {
|
|||
else o(values[i]).notDeepEquals(values[j])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
o(spy.callCount).equals(1)
|
||||
o(spy.args.length).equals(1)
|
||||
o(spy.args[0]).equals(1)
|
||||
|
|
@ -52,7 +52,7 @@ o.spec("ospec", function() {
|
|||
})
|
||||
o.spec("async", function() {
|
||||
var a = 0, b = 0
|
||||
|
||||
|
||||
o.before(function test(done) {
|
||||
callAsync(function() {
|
||||
a = 1
|
||||
|
|
@ -65,7 +65,7 @@ o.spec("ospec", function() {
|
|||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
o.beforeEach(function test(done) {
|
||||
callAsync(function() {
|
||||
b = 1
|
||||
|
|
@ -78,15 +78,15 @@ o.spec("ospec", function() {
|
|||
done()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
o("async hooks", function test(done) {
|
||||
callAsync(function() {
|
||||
var spy = o.spy()
|
||||
spy(a)
|
||||
|
||||
|
||||
o(a).equals(b)
|
||||
o(a).equals(1)("a and b should be initialized")
|
||||
|
||||
|
||||
done()
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue