Sha256: 044abe6068102fa507e77c21c3385ea8cc46fef36b87c2a84444111f315b4fc3

Contents?: true

Size: 1.1 KB

Versions: 156

Compression:

Stored size: 1.1 KB

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)"

# development dependencies
node_modules: package.json
	@npm prune
	@npm install

test-assignment: node_modules
	@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)
	@./node_modules/.bin/jasmine-node --captureExceptions $(OUTDIR)/$(TSTFILE)

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

Version data entries

156 entries across 156 versions & 1 rubygems

Version Path
trackler-2.1.0.0 tracks/javascript/Makefile
trackler-2.0.8.55 tracks/javascript/Makefile
trackler-2.0.8.54 tracks/javascript/Makefile
trackler-2.0.8.53 tracks/javascript/Makefile
trackler-2.0.8.52 tracks/javascript/Makefile
trackler-2.0.8.51 tracks/javascript/Makefile
trackler-2.0.8.50 tracks/javascript/Makefile
trackler-2.0.8.49 tracks/javascript/Makefile
trackler-2.0.8.48 tracks/javascript/Makefile
trackler-2.0.8.47 tracks/javascript/Makefile
trackler-2.0.8.46 tracks/javascript/Makefile
trackler-2.0.8.45 tracks/javascript/Makefile
trackler-2.0.8.44 tracks/javascript/Makefile
trackler-2.0.8.43 tracks/javascript/Makefile
trackler-2.0.8.42 tracks/javascript/Makefile
trackler-2.0.8.41 tracks/javascript/Makefile
trackler-2.0.8.40 tracks/javascript/Makefile
trackler-2.0.8.39 tracks/javascript/Makefile
trackler-2.0.8.38 tracks/javascript/Makefile
trackler-2.0.8.37 tracks/javascript/Makefile