Skip to content

_test.inc.js files improperly included when not building tests #655

Closed
@flimzy

Description

@flimzy

To reproduce, create a simple package:

main.go:

package main

func main() {}

main_test.go:

package main

import "testing"

func TestFoo(t *testing.T) {}

main_test.inc.js:

/* main_test.inc.js */

then compile:

$ gopherjs build -o main.js

And observe that the output contains the contents of the inc.js file:

$ grep -n main_test main.js
2331: /* main_test.inc.js */

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions