File: tests.rs

package info (click to toggle)
rust-console-error-panic-hook 0.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 660 kB
  • sloc: makefile: 4
file content (18 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern crate console_error_panic_hook;

use std::fs::File;
use std::io::Read;
use std::panic;
use std::process::Command;

#[test]
fn can_set_as_hook() {
    panic::set_hook(Box::new(console_error_panic_hook::hook));
}

#[test]
fn can_set_once() {
    for _ in 0..10 {
        console_error_panic_hook::set_once();
    }
}