Sha256: 087ebac39022be71aa74f2237036bfbe08319e883b7f3c8699b28315c2def493

Contents?: true

Size: 1002 Bytes

Versions: 240

Compression:

Stored size: 1002 Bytes

Contents

# assignments
ASSIGNMENT ?= ""
IGNOREDIRS := "^(\.git|docs|bin|node_modules|.idea)$$"
ASSIGNMENTS = $(shell find ./exercises -maxdepth 1 -mindepth 1 -type d | cut -d'/' -f3 | sort | grep -Ev $(IGNOREDIRS))

# output directories
TMPDIR ?= "/tmp"
OUTDIR := $(shell mktemp -d "$(TMPDIR)/$(ASSIGNMENT).XXXXXXXXXX")

# language specific config (tweakable per language)
FILEEXT := "js"
EXAMPLE := "example.$(FILEEXT)"
TSTFILE := "$(subst _,-,$(ASSIGNMENT)).spec.$(FILEEXT)"

test-assignment:
	@echo "running tests for: $(ASSIGNMENT)"
	@cp big-integer.$(FILEEXT) $(OUTDIR)
	@cp exercises/$(ASSIGNMENT)/$(TSTFILE) $(OUTDIR)
	@cp exercises/$(ASSIGNMENT)/$(EXAMPLE) $(OUTDIR)/$(subst _,-,$(ASSIGNMENT)).$(FILEEXT)
	#@sed -i.original 's/\bxit\b/it/g' $(OUTDIR)/*spec.$(FILEEXT)
	@sed 's/xit/it/g' exercises/$(ASSIGNMENT)/$(TSTFILE) > $(OUTDIR)/$(TSTFILE)
	@jasmine --random=true $(OUTDIR)/$(TSTFILE)

test:
	@for assignment in $(ASSIGNMENTS); do ASSIGNMENT=$$assignment $(MAKE) -s test-assignment || exit 1; done

Version data entries

240 entries across 240 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/javascript/Makefile
trackler-2.2.1.179 tracks/javascript/Makefile
trackler-2.2.1.178 tracks/javascript/Makefile
trackler-2.2.1.177 tracks/javascript/Makefile
trackler-2.2.1.176 tracks/javascript/Makefile
trackler-2.2.1.175 tracks/javascript/Makefile
trackler-2.2.1.174 tracks/javascript/Makefile
trackler-2.2.1.173 tracks/javascript/Makefile
trackler-2.2.1.172 tracks/javascript/Makefile
trackler-2.2.1.171 tracks/javascript/Makefile
trackler-2.2.1.170 tracks/javascript/Makefile
trackler-2.2.1.169 tracks/javascript/Makefile
trackler-2.2.1.167 tracks/javascript/Makefile
trackler-2.2.1.166 tracks/javascript/Makefile
trackler-2.2.1.165 tracks/javascript/Makefile
trackler-2.2.1.164 tracks/javascript/Makefile
trackler-2.2.1.163 tracks/javascript/Makefile
trackler-2.2.1.162 tracks/javascript/Makefile
trackler-2.2.1.161 tracks/javascript/Makefile
trackler-2.2.1.160 tracks/javascript/Makefile