@@ -2,7 +2,7 @@ use std::collections::HashSet;
2
2
use std:: fs;
3
3
use std:: path:: PathBuf ;
4
4
5
- use utils;
5
+ use utils:: { self , fixture } ;
6
6
use wasm_pack:: { self , manifest} ;
7
7
8
8
#[ test]
@@ -53,7 +53,7 @@ fn it_recognizes_a_map_during_depcheck() {
53
53
54
54
#[ test]
55
55
fn it_creates_a_package_json_default_path ( ) {
56
- let fixture = utils :: fixture ( "." ) ;
56
+ let fixture = fixture :: fixture ( "." ) ;
57
57
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
58
58
wasm_pack:: command:: init:: create_pkg_dir ( & fixture. path , & step) . unwrap ( ) ;
59
59
assert ! ( manifest:: write_package_json( & fixture. path, & None , false , "" , & step) . is_ok( ) ) ;
@@ -81,7 +81,7 @@ fn it_creates_a_package_json_default_path() {
81
81
82
82
#[ test]
83
83
fn it_creates_a_package_json_provided_path ( ) {
84
- let fixture = utils :: fixture ( "tests/fixtures/js-hello-world" ) ;
84
+ let fixture = fixture :: fixture ( "tests/fixtures/js-hello-world" ) ;
85
85
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
86
86
wasm_pack:: command:: init:: create_pkg_dir ( & fixture. path , & step) . unwrap ( ) ;
87
87
assert ! ( manifest:: write_package_json( & fixture. path, & None , false , "" , & step) . is_ok( ) ) ;
@@ -102,7 +102,7 @@ fn it_creates_a_package_json_provided_path() {
102
102
103
103
#[ test]
104
104
fn it_creates_a_package_json_provided_path_with_scope ( ) {
105
- let fixture = utils :: fixture ( "tests/fixtures/scopes" ) ;
105
+ let fixture = fixture :: fixture ( "tests/fixtures/scopes" ) ;
106
106
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
107
107
wasm_pack:: command:: init:: create_pkg_dir ( & fixture. path , & step) . unwrap ( ) ;
108
108
assert ! (
@@ -126,7 +126,7 @@ fn it_creates_a_package_json_provided_path_with_scope() {
126
126
127
127
#[ test]
128
128
fn it_creates_a_pkg_json_with_correct_files_on_node ( ) {
129
- let fixture = utils :: fixture ( "." ) ;
129
+ let fixture = fixture :: fixture ( "." ) ;
130
130
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
131
131
wasm_pack:: command:: init:: create_pkg_dir ( & fixture. path , & step) . unwrap ( ) ;
132
132
assert ! ( manifest:: write_package_json( & fixture. path, & None , false , "nodejs" , & step) . is_ok( ) ) ;
@@ -155,7 +155,7 @@ fn it_creates_a_pkg_json_with_correct_files_on_node() {
155
155
156
156
#[ test]
157
157
fn it_creates_a_package_json_with_correct_keys_when_types_are_skipped ( ) {
158
- let fixture = utils :: fixture ( "." ) ;
158
+ let fixture = fixture :: fixture ( "." ) ;
159
159
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
160
160
wasm_pack:: command:: init:: create_pkg_dir ( & fixture. path , & step) . unwrap ( ) ;
161
161
assert ! ( manifest:: write_package_json( & fixture. path, & None , true , "" , & step) . is_ok( ) ) ;
@@ -181,14 +181,14 @@ fn it_creates_a_package_json_with_correct_keys_when_types_are_skipped() {
181
181
182
182
#[ test]
183
183
fn it_errors_when_wasm_bindgen_is_not_declared ( ) {
184
- let fixture = utils :: fixture ( "tests/fixtures/bad-cargo-toml" ) ;
184
+ let fixture = fixture :: fixture ( "tests/fixtures/bad-cargo-toml" ) ;
185
185
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
186
186
assert ! ( manifest:: check_crate_config( & fixture. path, & step) . is_err( ) ) ;
187
187
}
188
188
189
189
#[ test]
190
190
fn it_does_not_error_when_wasm_bindgen_is_declared ( ) {
191
- let fixture = utils :: fixture ( "tests/fixtures/js-hello-world" ) ;
191
+ let fixture = fixture :: fixture ( "tests/fixtures/js-hello-world" ) ;
192
192
let step = wasm_pack:: progressbar:: Step :: new ( 1 ) ;
193
193
assert ! ( manifest:: check_crate_config( & fixture. path, & step) . is_ok( ) ) ;
194
194
}
0 commit comments