-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixed modal background * Test backported * Times set to 2 sec * Word wrap + metadata
- Loading branch information
1 parent
9f9acd2
commit 55fb84a
Showing
11 changed files
with
38 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { mainMenu } from '../src/app/components/mainMenu'; | ||
import { screen } from '@testing-library/dom'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
|
||
test('Adding nav element to DOM.', () => { | ||
const getData = (element) => { | ||
return element; | ||
}; | ||
mainMenu(document.body, getData); | ||
expect(screen.getByTestId('menuContainer')).toHaveClass('swquiz-menu'); | ||
expect(screen.getByTestId('menuContainer')).toBeInstanceOf(HTMLElement); | ||
}); | ||
|
||
test('Throw error when provided invalid parent argument', () => { | ||
const getData = (element) => { | ||
return element; | ||
}; | ||
expect(function () { | ||
mainMenu(document.bodysss, getData); | ||
}).toThrow(new TypeError("First argument isn't an object!")); | ||
}); | ||
|
||
test('Throw error when provided invalid callback argument', () => { | ||
expect(function () { | ||
mainMenu(document.body, 'getData'); | ||
}).toThrow(new TypeError("Callback argument isn't a function!")); | ||
}); |
This file was deleted.
Oops, something went wrong.