querySelector()method returns the first element that matches a specified CSS selector in the document. In order to return all the matches, use
content. It can be used only with the pseudo-elements
:before. We can use special characters in the CSS content however we can encounter difficulties when we want to display
data attributevalue in aforementioned
contentproperty for new line ...
property. Basically you can store any variable you want on an object, you can also store functions,
toEqual. Today I will describe more defined matchers which I find useful.
describe("", ...)is a suite. It defines a component of your application. It's not code, just a string.
it()function (which is called spec). This function says what piece of your app should do.
Array.sortwill sort alphabetically. For sorting date we can apply our own function.