Skip to content

Commit 7094cd4

Browse files
Tyler Phelandwillist
andcommitted
Remove unneeded check for existing file
- If the app requires the module it will fail if it's not there Co-authored-by: Daniel Thornton <dthornton@pivotal.io>
1 parent 699161d commit 7094cd4

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

integration/incomplete_package_json_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
)
1313

1414
func TestIncompletePackageJSONIntegration(t *testing.T) {
15-
spec.Run(t, "MyIntegration", incompletePackageJSONIntegration, spec.Report(report.Terminal{}))
15+
spec.Run(t, "IncompletePackageJSONIntegration", incompletePackageJSONIntegration, spec.Report(report.Terminal{}))
1616
}
1717

1818
func incompletePackageJSONIntegration(t *testing.T, when spec.G, it spec.S) {
@@ -40,11 +40,9 @@ func incompletePackageJSONIntegration(t *testing.T, when spec.G, it spec.S) {
4040
defer app.Destroy()
4141

4242
Expect(app.Start()).To(Succeed())
43-
44-
Expect(app.Files("node_modules/leftpad")).To(ContainElement(ContainSubstring("node_modules/leftpad")))
45-
Expect(app.Files("node_modules/hashish")).To(ContainElement(ContainSubstring("node_modules/hashish")))
43+
response, _, err := app.HTTPGet("/")
44+
Expect(err).NotTo(HaveOccurred())
45+
Expect(response).To(ContainSubstring("Hello, World!"))
4646
})
47-
4847
})
49-
5048
}

integration/testdata/incomplete_package_json/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
const http = require('http')
2+
const leftpad = require('leftpad')
3+
const hashish = require('hashish')
24
const port = Number(process.env.PORT || 8080);
35

46
const requestHandler = (request, response) => {

0 commit comments

Comments
 (0)