From 3d1cd02f27518f1a04374c7c8320cd5d82ede6e9 Mon Sep 17 00:00:00 2001 From: Minteck Date: Thu, 23 Feb 2023 19:34:56 +0100 Subject: Updated 40 files, added 37 files, deleted 1103 files and renamed 3905 files (automated) --- school/node_modules/node-forge/tests/tasks.js | 378 -------------------------- 1 file changed, 378 deletions(-) delete mode 100644 school/node_modules/node-forge/tests/tasks.js (limited to 'school/node_modules/node-forge/tests/tasks.js') diff --git a/school/node_modules/node-forge/tests/tasks.js b/school/node_modules/node-forge/tests/tasks.js deleted file mode 100644 index dd3ffde..0000000 --- a/school/node_modules/node-forge/tests/tasks.js +++ /dev/null @@ -1,378 +0,0 @@ -/** - * Forge Tasks Test - * - * @author David I. Lehn - * - * Copyright (c) 2009-2010 Digital Bazaar, Inc. All rights reserved. - */ -jQuery(function($) -{ - var cat = 'forge.tests.tasks'; - - var tests = []; - var passed = 0; - var failed = 0; - - var init = function() { - passed = failed = 0; - $('.ready,.testing,.pass,.fail') - .removeClass('ready testing pass fail'); - $('#status') - .text('Ready.') - .addClass('ready'); - $('#total').text(tests.length); - $('#pass').text(passed); - $('#fail').text(failed); - $('.expect').empty(); - $('.result').empty(); - $('.time').empty(); - $('#start').removeAttr('disabled'); - }; - - var start = function() - { - $('#start').attr('disabled', 'disabled'); - // meta! use tasks to run the task tests - forge.task.start({ - type: 'test', - run: function(task) { - task.next('starting', function(task) { - forge.log.debug(cat, 'start'); - $('#status') - .text('Testing...') - .addClass('testing') - .removeClass('idle'); - }); - $.each(tests, function(i, test) { - task.next('test', function(task) { - var title = $('li:first', test.container); - if($('#scroll:checked').length === 1) - { - $('html,body').animate({scrollTop: title.offset().top}); - } - title.addClass('testing'); - test.run(task, test); - }); - task.next('test', function(task) { - $('li:first', test.container).removeClass('testing'); - }); - }); - task.next('success', function(task) { - forge.log.debug(cat, 'done'); - if(failed === 0) { - $('#status') - .text('PASS') - .addClass('pass') - .removeClass('testing'); - } else { - // FIXME: should just be hitting failure() below - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }, - failure: function() { - $('#status') - .text('FAIL') - .addClass('fail') - .removeClass('testing'); - } - }); - }; - - $('#start').click(function() { - start(); - }); - - $('#reset').click(function() { - init(); - }); - - var addTest = function(name, run) - { - var container = $('