Skip to content

Commit

Permalink
cmd,js: remove un-necessary type conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
cuonglm committed Nov 7, 2019
1 parent 6f46be7 commit 9d9bc4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func TestIntegrationConvertCmd(t *testing.T) {

defaultFs = afero.NewMemMapFs()

err = afero.WriteFile(defaultFs, harFile, []byte(har), 0644)
err = afero.WriteFile(defaultFs, harFile, har, 0644)
assert.NoError(t, err)

buf := &bytes.Buffer{}
Expand Down
3 changes: 1 addition & 2 deletions js/initcontext_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ func TestInitContextRequire(t *testing.T) {
func createAndReadFile(t *testing.T, file string, content []byte, expectedLength int, binary bool) (*BundleInstance, error) {
fs := afero.NewMemMapFs()
assert.NoError(t, fs.MkdirAll("/path/to", 0755))
assert.NoError(t, afero.WriteFile(fs, "/path/to/"+file, []byte(content), 0644))
assert.NoError(t, afero.WriteFile(fs, "/path/to/"+file, content, 0644))

afero.WriteFile(fs, "/path/to/"+file, []byte(content), 0644)
binaryArg := ""
if binary {
binaryArg = ",\"b\""
Expand Down

0 comments on commit 9d9bc4b

Please sign in to comment.