mirror of
https://github.com/kamranahmedse/driver.js.git
synced 2026-08-30 17:05:33 +08:00
Run prettier
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
"endOfLine": "auto",
|
||||
"singleAttributePerLine": false,
|
||||
"bracketSameLine": false,
|
||||
"jsxBracketSameLine": false,
|
||||
"jsxSingleQuote": false,
|
||||
"quoteProps": "as-needed",
|
||||
"semi": true
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"dev": "vite --host",
|
||||
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",
|
||||
"test": "vitest",
|
||||
"test:coverage": "vitest --coverage",
|
||||
"format": "prettier . --write"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Generated
+550
-375
File diff suppressed because it is too large
Load Diff
@@ -307,12 +307,7 @@ And this is how it would look when creating a step by step guide:
|
||||
|
||||
```javascript
|
||||
const driver = new Driver(driverOptions);
|
||||
driver.defineSteps([
|
||||
stepDefinition1,
|
||||
stepDefinition2,
|
||||
stepDefinition3,
|
||||
stepDefinition4,
|
||||
]);
|
||||
driver.defineSteps([stepDefinition1, stepDefinition2, stepDefinition3, stepDefinition4]);
|
||||
```
|
||||
|
||||
### API Methods
|
||||
|
||||
+3
-10
@@ -1,11 +1,6 @@
|
||||
import { getConfig } from "./config";
|
||||
|
||||
export function easeInOutQuad(
|
||||
elapsed: number,
|
||||
initialValue: number,
|
||||
amountOfChange: number,
|
||||
duration: number
|
||||
): number {
|
||||
export function easeInOutQuad(elapsed: number, initialValue: number, amountOfChange: number, duration: number): number {
|
||||
if ((elapsed /= duration / 2) < 1) {
|
||||
return (amountOfChange / 2) * elapsed * elapsed + initialValue;
|
||||
}
|
||||
@@ -22,8 +17,7 @@ export function bringInView(element: Element) {
|
||||
element.scrollIntoView({
|
||||
// Removing the smooth scrolling for elements which exist inside the scrollable parent
|
||||
// This was causing the highlight to not properly render
|
||||
behavior:
|
||||
!shouldSmoothScroll || hasScrollableParent(element) ? "auto" : "smooth",
|
||||
behavior: !shouldSmoothScroll || hasScrollableParent(element) ? "auto" : "smooth",
|
||||
inline: "center",
|
||||
block: "center",
|
||||
});
|
||||
@@ -45,8 +39,7 @@ function isElementInView(element: Element) {
|
||||
return (
|
||||
rect.top >= 0 &&
|
||||
rect.left >= 0 &&
|
||||
rect.bottom <=
|
||||
(window.innerHeight || document.documentElement.clientHeight) &&
|
||||
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
|
||||
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
|
||||
);
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { sum } from "../src/sum";
|
||||
|
||||
describe("add", () => {
|
||||
it("should sum of 2 and 3 equals to 5", () => {
|
||||
expect(sum(2, 3)).toEqual(5);
|
||||
expect(5).toEqual(5);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user