Structure your code differently. Have your main code work as a framework for what they are doing -> have a ToImplement class(es) in a seperate file which you will refrence in tests (maybe not even directly, you could still run tests against the index.js stuff). The class under test can have some public methods or you can make students add them, as the tests will fail otherwise. You can then mess with index.js if you miss anything and they could then just pull.