Skip to content

Commit

Permalink
Make integration tests into its own crate
Browse files Browse the repository at this point in the history
This ensures the deno executable is properly created before running the
integration tests.
  • Loading branch information
ry committed Sep 16, 2019
1 parent 9ce98ef commit 52b5801
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
10 changes: 9 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
members = [
"cli",
"core",
"tools/hyper_hello",
"deno_typescript",
"js",
"tests",
"tools/hyper_hello",
]
3 changes: 0 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,3 @@ fwdansi = "1.0.1"

[target.'cfg(unix)'.dependencies]
nix = "0.14.1"

[dev-dependencies]
os_pipe = "0.8.2"
5 changes: 1 addition & 4 deletions cli/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ extern crate serde;
extern crate serde_derive;
extern crate url;

#[cfg(test)]
mod integration_tests;

mod colors;
pub mod colors;
pub mod compilers;
pub mod deno_dir;
pub mod deno_error;
Expand Down
12 changes: 12 additions & 0 deletions tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "deno_integration_tests"
version = "0.0.1"
publish = false

[lib]
path = "integration_tests.rs"

[dependencies]
deno_cli = { path = "../cli" }
os_pipe = "0.8.2"
log = "0.4.8"
7 changes: 6 additions & 1 deletion cli/integration_tests.rs → tests/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
use crate::colors::strip_ansi_codes;
#[macro_use]
extern crate log;
extern crate deno_cli;
extern crate os_pipe;

use deno_cli::colors::strip_ansi_codes;
use os_pipe::pipe;
use std::env;
use std::io::Read;
Expand Down

0 comments on commit 52b5801

Please sign in to comment.