Skip to content

Commit

Permalink
Move integration tests to //cli/tests/ (#2964)
Browse files Browse the repository at this point in the history
This ensures the deno executable is properly created before running the integration tests.

Also allows deno_cli to be used as a lib. Docs are now properly generated: https://docs.rs/deno_cli/0.18.4/deno_cli/

Towards #2933
Prep for #2955
  • Loading branch information
ry authored Sep 17, 2019
1 parent 02cb34d commit 9cfdc60
Show file tree
Hide file tree
Showing 228 changed files with 474 additions and 464 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/js/deps/
/tests/error_syntax.js
cli/tests/error_syntax.js
4 changes: 2 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
tests/error_syntax.js
tests/badly_formatted.js
cli/tests/error_syntax.js
cli/tests/badly_formatted.js
2 changes: 1 addition & 1 deletion Cargo.lock

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

13 changes: 9 additions & 4 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
[[bin]]
name = "deno"
path = "main.rs"

[package]
name = "deno_cli"
version = "0.18.3"
version = "0.18.4"
license = "MIT"
authors = ["the Deno authors"]
edition = "2018"
description = "Provides the deno executable"
repository = "https://github.com/denoland/deno"
default-run = "deno"

[lib]
name = "deno_cli"
path = "lib.rs"

[[bin]]
name = "deno"
path = "main.rs"

[dependencies]
deno = { path = "../core", version = "0.18.0" }
deno_cli_snapshots = { path = "../js", version = "0.18.3" }
Expand Down
1 change: 0 additions & 1 deletion cli/colors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ lazy_static! {
}

/// Helper function to strip ansi codes.
#[cfg(test)]
pub fn strip_ansi_codes(s: &str) -> std::borrow::Cow<str> {
STRIP_ANSI_RE.replace_all(s, "")
}
Expand Down
2 changes: 1 addition & 1 deletion cli/compilers/ts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ mod tests {
url: specifier.as_url().clone(),
filename: PathBuf::from(p.to_str().unwrap().to_string()),
media_type: msg::MediaType::TypeScript,
source_code: include_bytes!("../../tests/002_hello.ts").to_vec(),
source_code: include_bytes!("../tests/002_hello.ts").to_vec(),
};

let mock_state = ThreadSafeState::mock(vec![
Expand Down
Loading

0 comments on commit 9cfdc60

Please sign in to comment.