v1
7/6/2021 by blabdude -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
const arr1 = ["interaction", "intro", "music_offtopic", "outro", "preview", "selfpromo", "sponsor"];
const arr2 = ["music_offtopic", "intro", "selfpromo", "interaction", "sponsor", "preview", "outro" ];

function test1(a,b) {
  if (a.length !== b.length) return false;
  a.sort()
  b.sort()
  for (var i = 0; i < a.length; i++) {
    if (a[i] !== b[i]) return false;
  }
  return true
}

function test2(a,b) {
  if (a.length !== b.length) return false;
  a.sort()
  b.sort()
  a.forEach((e,i) => { if (b[i]!==e) return false })
  return true
}

function test3(a,b) {
  if (a.length !== b.length) return false;
  a.forEach((e) => { if (!b.includes(e)) return false })
  return true
}

function test4(a,b) {
	a.sort()
	b.sort()
	return JSON.stringify(a) === JSON.stringify(b)
}

function test5(a,b) {
  if (a.length !== b.length) return false;
  a.forEach(function (e) { if (!b.includes(e)) return false })
  return true
}
delete caserun single casemove downdrag and drop case


ready



test1(arr1, arr2)
delete caserun single casemove upmove downdrag and drop case


ready



test2(arr1, arr2)
delete caserun single casemove upmove downdrag and drop case


ready



test3(arr1, arr2)
delete caserun single casemove upmove downdrag and drop case


ready



test4(arr1, arr2)
delete caserun single casemove upmove downdrag and drop case


ready



test5(arr1,arr2)
delete caserun single casemove updrag and drop case


ready



arr1.sort()
arr2.sort()
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN