UNPKG

1.54 kBJavaScriptView Raw
1/*
2 * Licensed to Cloudkick, Inc ('Cloudkick') under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * Cloudkick licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16*/
17
18var someFile = require('./some-file');
19
20exports['test_uncaught_exception'] = function(test, assert) {
21 throw new Error('Testing uncaught exception');
22 // Line bellow won't be reached
23 test.finish();
24};
25
26exports['test_uncaught_exception_2'] = function(test, assert) {
27 someFile.throwException();
28 // Line bellow won't be reached
29 test.finish();
30};
31
32exports['test_unknown_method'] = function(test, assert) {
33 someFile.unknownMethod();
34 // Line bellow won't be reached
35 test.finish();
36};
37
38exports['test_uncaught_nested_functions'] = function(test, assert) {
39 someFile.throwNestedFunctions();
40 // Line bellow won't be reached
41 test.finish();
42};
43
44exports['test1_require_throws'] = function(test, assert) {
45 require('timeout-throws.js');
46};