mirror of
https://github.com/wassname/CanvasTextWrapper.git
synced 2026-07-13 17:41:04 +08:00
v0.1.0
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
exports.fail = {
|
||||
fail: function(test) {
|
||||
test.ok(undefined, 'this value should be truthy');
|
||||
test.done();
|
||||
},
|
||||
failSupertestError: function(test) {
|
||||
var error = new Error('Something arbitrary');
|
||||
// Must be long enough that the inspect calls try to
|
||||
// wrap the line for indentation.
|
||||
error.actual = { foo: 'bar', something: 'complex', more: 'more' };
|
||||
error.expected = "No you didn't"
|
||||
error.showDiff = true;
|
||||
throw(error);
|
||||
test.done();
|
||||
},
|
||||
};
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
|
||||
var grunt = require('grunt');
|
||||
|
||||
exports.nodeunit = {
|
||||
please_work: function(test) {
|
||||
test.expect(1);
|
||||
test.ok(true, 'this had better work.');
|
||||
test.done();
|
||||
},
|
||||
fail: function(test) {
|
||||
test.expect(3);
|
||||
grunt.util.spawn({
|
||||
grunt: true,
|
||||
args: ['test:fail', '--no-color'],
|
||||
}, function(err, result) {
|
||||
test.ok(result.stdout.indexOf("Operator:") !== -1, 'Operator should display for multiline.');
|
||||
test.ok(result.stdout.indexOf('Message: this value should be truthy') !== -1, 'Message should have been displayed.');
|
||||
test.ok(result.stdout.indexOf('Error: undefined == true') !== -1, 'Error should have been displayed.');
|
||||
test.done();
|
||||
});
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user