To run in Go:
go test
To run in JavaScript:
node pancakes.js
Note: Implemented in JavaScript as well for fun, but didn't take the time to install a test library. Please refer to the code in the Go file for the complete solution: pancakes_test.go
.