How to use the jasmine.DEFAULT_TIMEOUT_INTERVAL function in jasmine

To help you get started, we’ve selected a few jasmine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tensorflow / tfjs / tfjs-automl / src / test_node.ts View on Github external
* Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */

// tslint:disable-next-line: no-imports-from-dist
import {setTestEnvs} from '@tensorflow/tfjs-core/dist/jasmine_util';

// tslint:disable-next-line:no-require-imports
const jasmine = require('jasmine');

// Increase test timeout since we are fetching the model files from GCS.
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;

process.on('unhandledRejection', e => {
  throw e;
});

// Run node tests againts the cpu backend.
setTestEnvs([{name: 'node', backendName: 'cpu'}]);

const runner = new jasmine();
runner.loadConfig({spec_files: ['src/**/*_test.ts'], random: false});
runner.execute();