Sign inSign up

singpath/verifier2-javascript

By singpath

Updated over 10 years ago

Javascript verifier image

Image
2

10K+

singpath/verifier2-javascript repository overview

Javascript Verifier for SingPath.com

Runs some javascript code and test it using a simple testing framework and nodejs assert.

Usage

To download the the docker image and run the solutions and its tests.

docker run -ti --rm \
	--net="none" \
	--cap-drop=ALL \
	singpath/verifier2-javascript:latest \
	verify '{
		"tests": "foo=1",
		"solution": "test('test1', () => assert.equal(1, foo))"
	}'

You can provide the solution/tests payload as JSON or YAML. If in YAML, the YAML document must start with "---".

To pass the content of a file:

docker run -ti --rm \
	--net="none" \
	--cap-drop=ALL \
	singpath/verifier2-javascript:latest \
	verify "$(cat examples/pass.json)"

To build the verifier instead of downloading it:

git clone https://github.com/ChrisBoesch/singpath-verifiers.git
cd singpath-verifiers/javascript
make
docker run -ti --rm \
	--net="none" \
	--cap-drop=ALL \
	singpath/verifier2-javascript:latest \
	verify "$(cat examples/pass.json)

Tag summary

Content type

Image

Digest

sha256:bf25f00e8

Size

103.6 MB

Last updated

over 10 years ago

docker pull singpath/verifier2-javascript