juice-shop-ctf-cli
Version:
Capture-the-Flag (CTF) environment setup tools for OWASP Juice Shop
35 lines (27 loc) • 914 B
JavaScript
/*
* Copyright (c) 2016-2025 Bjoern Kimminich & the OWASP Juice Shop contributors.
* SPDX-License-Identifier: MIT
*/
const chai = require('chai')
const expect = chai.expect
const calculateScore = require('../../lib/calculateScore')
describe('Score', () => {
it('should be 100 points for a * challenge', () => {
expect(calculateScore(1)).to.equal(100)
})
it('should be 250 points for a ** challenge', () => {
expect(calculateScore(2)).to.equal(250)
})
it('should be 450 points for a *** challenge', () => {
expect(calculateScore(3)).to.equal(450)
})
it('should be 700 points for a **** challenge', () => {
expect(calculateScore(4)).to.equal(700)
})
it('should be 1000 points for a ***** challenge', () => {
expect(calculateScore(5)).to.equal(1000)
})
it('should be 1350 points for a ****** challenge', () => {
expect(calculateScore(6)).to.equal(1350)
})
})