From 7f8b56eadd637bc7e70f879ab55b4ac64c2f18e0 Mon Sep 17 00:00:00 2001 From: Troels Nielsen Date: Sun, 13 Jan 2013 23:59:05 +0100 Subject: [PATCH] Use the newly compiled code when running tests under build:full --- Cakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cakefile b/Cakefile index 899189c8..08a6c22b 100644 --- a/Cakefile +++ b/Cakefile @@ -67,7 +67,11 @@ task 'build:full', 'rebuild the source twice, and run the tests', -> build -> build -> csPath = './lib/coffee-script' - delete require.cache[require.resolve csPath] + csDir = path.dirname require.resolve csPath + + for mod of require.cache when csDir is mod[0 ... csDir.length] + delete require.cache[mod] + unless runTests require csPath process.exit 1