mirror of
https://github.com/gchq/CyberChef
synced 2024-12-28 05:23:10 +00:00
Make expectOutput actually check the output
This commit is contained in:
parent
ab0493f53a
commit
0f0efefbf7
1 changed files with 5 additions and 4 deletions
|
@ -176,13 +176,14 @@ function loadRecipe(browser, opName, input, args) {
|
|||
*/
|
||||
function expectOutput(browser, expected) {
|
||||
browser.execute(expected => {
|
||||
const output = window.app.manager.output.outputEditorView.state.doc.toString();
|
||||
return window.app.manager.output.outputEditorView.state.doc.toString();
|
||||
}, [expected], function({value}) {
|
||||
if (expected instanceof RegExp) {
|
||||
return expected.test(output);
|
||||
browser.expect(value).match(expected);
|
||||
} else {
|
||||
return expected === output;
|
||||
browser.expect(value).to.be.equal(expected);
|
||||
}
|
||||
}, [expected]);
|
||||
});
|
||||
}
|
||||
|
||||
/** @function
|
||||
|
|
Loading…
Reference in a new issue