mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 01:55:40 +00:00
levels tests
This commit is contained in:
@@ -16,25 +16,12 @@
|
||||
*/
|
||||
|
||||
import getLevelFields from './getLevelFields';
|
||||
import {getAddForm, addLevel} from '../setupTests';
|
||||
import {Level} from './index';
|
||||
//import CONST from '../const';
|
||||
import {getAddForm, level1, level2, addLevel} from '../setupTests';
|
||||
|
||||
document.body.innerHTML = getAddForm();
|
||||
|
||||
const level1: Level = {
|
||||
difficulty_factor: 200,
|
||||
visitor_threshold: 500,
|
||||
};
|
||||
|
||||
const level2: Level = {
|
||||
difficulty_factor: 400,
|
||||
visitor_threshold: 700,
|
||||
};
|
||||
|
||||
it('get levels fields works', () => {
|
||||
addLevel(level1.visitor_threshold, level1.difficulty_factor);
|
||||
console.log(document.body.innerHTML);
|
||||
expect(getLevelFields(1)).toEqual(level1);
|
||||
|
||||
addLevel(level2.visitor_threshold, level2.difficulty_factor);
|
||||
|
||||
Reference in New Issue
Block a user