@@ -19,17 +19,19 @@ def fixture_path(*args)
19
19
class TestTestApp < Minitest ::Test
20
20
def test_app_config
21
21
name , display_name , single_app = app_config ( fixture_path ( 'with_resources' ) )
22
- assert_equal ( name , 'TestFixture' )
23
- assert_equal ( display_name , 'Test Fixture' )
22
+
23
+ assert_equal ( 'TestFixture' , name )
24
+ assert_equal ( 'Test Fixture' , display_name )
24
25
assert_nil ( single_app )
25
26
end
26
27
27
28
def test_app_config_single_app
28
29
name , display_name , version , single_app = app_config ( fixture_path ( 'single_app_mode' ) )
29
- assert_equal ( name , 'TestFixture' )
30
- assert_equal ( display_name , 'Test Fixture' )
31
- assert_equal ( version , '1.0.0' )
32
- assert_equal ( single_app , 'test-fixture' )
30
+
31
+ assert_equal ( 'TestFixture' , name )
32
+ assert_equal ( 'Test Fixture' , display_name )
33
+ assert_equal ( '1.0.0' , version )
34
+ assert_equal ( 'test-fixture' , single_app )
33
35
end
34
36
35
37
def test_autolink_script_path
@@ -40,33 +42,37 @@ def test_autolink_script_path
40
42
end
41
43
42
44
def test_flipper_enabled?
43
- assert ( flipper_enabled? )
45
+ assert_predicate ( self , : flipper_enabled?)
44
46
45
47
use_flipper! ( false )
46
48
47
- refute ( flipper_enabled? )
49
+ refute_predicate ( self , : flipper_enabled?)
48
50
49
51
use_flipper!
50
52
51
- assert ( flipper_enabled? )
53
+ assert_predicate ( self , : flipper_enabled?)
52
54
ensure
53
55
use_flipper! ( nil )
54
56
end
55
57
56
58
def test_flipper_versions
57
- assert_equal ( { } , flipper_versions )
59
+ assert_empty ( flipper_versions )
58
60
59
61
use_flipper! ( false )
62
+
60
63
refute ( flipper_versions )
61
64
62
65
versions = { 'Flipper' => '~> 0.41.1' }
63
66
use_flipper! ( versions )
67
+
64
68
assert_equal ( versions , flipper_versions )
65
69
66
70
use_flipper!
67
- assert_equal ( { } , flipper_versions )
71
+
72
+ assert_empty ( flipper_versions )
68
73
69
74
use_flipper! ( false )
75
+
70
76
refute ( flipper_versions )
71
77
ensure
72
78
use_flipper! ( nil )
@@ -78,16 +84,19 @@ def test_nearest_node_modules
78
84
assert_equal ( expected , nearest_node_modules ( fixture_path ( 'test_app' ) ) )
79
85
80
86
react_native = fixture_path ( 'test_app' , 'node_modules' , 'react-native' )
87
+
81
88
assert_equal ( expected , nearest_node_modules ( react_native ) )
82
89
83
90
assert_equal ( expected , nearest_node_modules ( fixture_path ( 'test_app' , 'src' ) ) )
84
91
end
85
92
86
93
def test_package_version
87
94
react_native = fixture_path ( 'test_app' , 'node_modules' , 'react-native' )
95
+
88
96
assert_equal ( Gem ::Version . new ( '1000.0.0' ) , package_version ( react_native ) )
89
97
90
98
cli = fixture_path ( 'test_app' , 'node_modules' , '@react-native-community' , 'cli-platform-ios' )
99
+
91
100
assert_equal ( Gem ::Version . new ( '4.10.1' ) , package_version ( cli ) )
92
101
end
93
102
@@ -170,7 +179,7 @@ def test_react_native_pods
170
179
manifest = JSON . parse ( File . read ( manifest_path ) )
171
180
172
181
if project_root . to_s . include? ( 'without' )
173
- assert_equal ( [ ] , manifest [ 'resources' ] )
182
+ assert_empty ( manifest [ 'resources' ] )
174
183
elsif project_root . to_s . include? ( 'with_platform_resources' )
175
184
assert_equal ( platform_resources , manifest [ 'resources' ] . sort )
176
185
else
@@ -190,6 +199,7 @@ def test_macos_project_cannot_set_development_team
190
199
191
200
project = Xcodeproj ::Project . open ( 'macos/ReactTestApp.xcodeproj' )
192
201
test_app = project . targets . detect { |target | target . name == 'ReactTestApp' }
202
+
193
203
assert ( test_app )
194
204
test_app . build_configurations . each do |config |
195
205
assert_equal ( '-' , config . build_settings [ 'CODE_SIGN_IDENTITY' ] )
0 commit comments