[fix]: Object Oriented Programming: Inherit Behaviors from a Supertype (#35063)
* fix: revert semicolon check * fix: test name
This commit is contained in:
parent
4fe2558f99
commit
85eca8ef36
@ -33,9 +33,9 @@ tests:
|
||||
- text: The <code>beagle</code> variable should be defined.
|
||||
testString: assert(typeof beagle !== "undefined", 'The <code>beagle</code> variable should be defined.');
|
||||
- text: The <code>duck</code> variable should be initialised with <code>Object.create</code>.
|
||||
testString: assert(/(let|const|var)\s*beagle\s*=\s*Object\.create\s*\(\s*Animal\.prototype\s*\)\s*;/.test(code), 'The <code>duck</code> variable should be initialised with <code>Object.create</code>');
|
||||
testString: assert(/(let|const|var)\s{1,}duck\s*=\s*Object\.create\s*\(\s*Animal\.prototype\s*\)\s*/.test(code), 'The <code>duck</code> variable should be initialised with <code>Object.create</code>.');
|
||||
- text: The <code>beagle</code> variable should be initialised with <code>Object.create</code>.
|
||||
testString: assert(/(let|const|var)\s*duck\s*=\s*Object\.create\s*\(\s*Animal\.prototype\s*\)\s*;/.test(code), 'The <code>beagle</code> variable should be initialised with <code>Object.create</code>.');
|
||||
testString: assert(/(let|const|var)\s{1,}beagle\s*=\s*Object\.create\s*\(\s*Animal\.prototype\s*\)\s*/.test(code), 'The <code>beagle</code> variable should be initialised with <code>Object.create</code>.');
|
||||
- text: <code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.
|
||||
testString: assert(duck instanceof Animal, '<code>duck</code> should have a <code>prototype</code> of <code>Animal</code>.');
|
||||
- text: <code>beagle</code> should have a <code>prototype</code> of <code>Animal</code>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user