Advertisement
Guest User

Untitled

a guest
Jun 14th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Seda põhjusel, et igal describel on argumendiks funtsioon, kuhu vahele testi kirjutad:
  2. const firstVariable = "Foo";
  3. describe('Kasutaja login', () => {
  4.     const secondVariable = "Bar";
  5.     it('should login successfully', (done) => {
  6.         console.log(secondVariable); // Bar
  7.         done();
  8.     });
  9. });
  10.  
  11. describe('Kasutaja logout', () => {
  12.     console.log(secondVariable); // Undefined
  13.     console.log(firstVariable); // Foo
  14.     it('should logout successfully', (done) => {
  15.         done();
  16.     });
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement