dwf: started moving Exceptions tests from bootstrap to runner
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
<script type="text/javascript" src="lib/mock-timeout.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jasmine.include('suites/ExceptionsTest.js', true);
|
||||
jasmine.include('suites/JsonReporterTest.js', true);
|
||||
jasmine.include('suites/MatchersTest.js', true);
|
||||
jasmine.include('suites/NestedResultsTest.js', true);
|
||||
|
||||
34
spec/suites/ExceptionsTest.js
Normal file
34
spec/suites/ExceptionsTest.js
Normal file
@@ -0,0 +1,34 @@
|
||||
describe('Exceptions:', function() {
|
||||
var env;
|
||||
|
||||
beforeEach(function() {
|
||||
env = new jasmine.Env();
|
||||
});
|
||||
|
||||
it('jasmine.formatException formats Firefox exception maessages as expected', function() {
|
||||
var sampleFirefoxException = {
|
||||
fileName: 'foo.js',
|
||||
line: '1978',
|
||||
message: 'you got your foo in my bar',
|
||||
name: 'A Classic Mistake'
|
||||
};
|
||||
|
||||
var expected = 'A Classic Mistake: you got your foo in my bar in foo.js (line 1978)';
|
||||
|
||||
expect(jasmine.util.formatException(sampleFirefoxException)).toEqual(expected);
|
||||
});
|
||||
|
||||
it('jasmine.formatException formats Webkit exception maessages as expected', function() {
|
||||
var sampleWebkitException = {
|
||||
sourceURL: 'foo.js',
|
||||
lineNumber: '1978',
|
||||
message: 'you got your foo in my bar',
|
||||
name: 'A Classic Mistake'
|
||||
};
|
||||
|
||||
var expected = 'A Classic Mistake: you got your foo in my bar in foo.js (line 1978)';
|
||||
|
||||
expect(jasmine.util.formatException(sampleWebkitException)).toEqual(expected);
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user