-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1094 from jiji14/prettier-to-service-rewrite
Prettier Setup (Merge to Service Rewrite Branch)
- Loading branch information
Showing
142 changed files
with
12,800 additions
and
9,266 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
# Ignore www/dist, manual_lib, json | ||
www/dist | ||
www/manual_lib | ||
www/json | ||
|
||
# This is the pattern to check only www directory | ||
# Ignore all | ||
/* | ||
# but don't ignore all the files in www directory | ||
!/www |
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,10 @@ | ||
{ | ||
"printWidth": 100, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true, | ||
"bracketSameLine": true, | ||
"endOfLine": "lf", | ||
"semi": true | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
export const mockFileSystem = () => { | ||
window['resolveLocalFileSystemURL'] = function (parentDir, handleFS) { | ||
const fs = { | ||
filesystem: | ||
{ | ||
root: | ||
{ | ||
filesystem: { | ||
root: { | ||
getFile: (path, options, onSuccess) => { | ||
let fileEntry = { | ||
file: (handleFile) => { | ||
let file = new File(["this is a mock"], "loggerDB"); | ||
let file = new File(['this is a mock'], 'loggerDB'); | ||
handleFile(file); | ||
} | ||
} | ||
}, | ||
}; | ||
onSuccess(fileEntry); | ||
} | ||
} | ||
} | ||
} | ||
console.log("in mock, fs is ", fs, " get File is ", fs.filesystem.root.getFile); | ||
}, | ||
}, | ||
}, | ||
}; | ||
console.log('in mock, fs is ', fs, ' get File is ', fs.filesystem.root.getFile); | ||
handleFS(fs); | ||
} | ||
} | ||
}; | ||
}; |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const mockLogger = () => { | ||
window['Logger'] = { log: console.log }; | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,30 +1,23 @@ | ||
/** | ||
* @jest-environment jsdom | ||
*/ | ||
import React from 'react' | ||
import {render, fireEvent, waitFor, screen} from '@testing-library/react-native' | ||
import LoadMoreButton from '../js/diary/list/LoadMoreButton' | ||
import React from 'react'; | ||
import { render, fireEvent, waitFor, screen } from '@testing-library/react-native'; | ||
import LoadMoreButton from '../js/diary/list/LoadMoreButton'; | ||
|
||
|
||
describe("LoadMoreButton", () => { | ||
it("renders correctly", async () => { | ||
render( | ||
<LoadMoreButton onPressFn={() => {}}>{}</LoadMoreButton> | ||
); | ||
describe('LoadMoreButton', () => { | ||
it('renders correctly', async () => { | ||
render(<LoadMoreButton onPressFn={() => {}}>{}</LoadMoreButton>); | ||
await waitFor(() => { | ||
expect(screen.getByTestId("load-button")).toBeTruthy(); | ||
expect(screen.getByTestId('load-button')).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
it("calls onPressFn when clicked", () => { | ||
it('calls onPressFn when clicked', () => { | ||
const mockFn = jest.fn(); | ||
const { getByTestId } = render( | ||
<LoadMoreButton onPressFn={mockFn}>{}</LoadMoreButton> | ||
); | ||
const loadButton = getByTestId("load-button"); | ||
const { getByTestId } = render(<LoadMoreButton onPressFn={mockFn}>{}</LoadMoreButton>); | ||
const loadButton = getByTestId('load-button'); | ||
fireEvent.press(loadButton); | ||
expect(mockFn).toHaveBeenCalled(); | ||
}); | ||
}); | ||
|
||
|
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
Oops, something went wrong.