-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various readme and config files are not linted by individual projects and as a result they end up missed. This PR is just from a global lint. I've created SDK-892 to address this deficit.
- Loading branch information
1 parent
ca1dd49
commit aafd1a5
Showing
17 changed files
with
82 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
"module": "./dist/index.mjs", | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@launchdarkly/cloudflare-server-sdk": "2.2.3" | ||
"@launchdarkly/cloudflare-server-sdk": "2.6.1" | ||
}, | ||
"devDependencies": { | ||
"@cloudflare/workers-types": "^4.20230321.0", | ||
|
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
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
31 changes: 15 additions & 16 deletions
31
packages/tooling/jest/example/react-native-example/src/welcome.test.tsx
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,29 +1,28 @@ | ||
/** | ||
* @jest-environment jsdom | ||
*/ | ||
import { render, screen } from '@testing-library/react-native'; | ||
|
||
import { mockFlags, resetLDMocks } from '@launchdarkly/jest/react-native'; | ||
import { screen, render } from '@testing-library/react-native'; | ||
import { useLDClient } from '@launchdarkly/react-native-client-sdk'; | ||
|
||
import Welcome from './welcome'; | ||
|
||
describe('Welcome component test', () => { | ||
afterEach(() => { | ||
resetLDMocks(); | ||
}); | ||
|
||
afterEach(() => { | ||
resetLDMocks(); | ||
}); | ||
|
||
test('mock boolean flag correctly', () => { | ||
mockFlags({ 'my-boolean-flag': true }); | ||
render(<Welcome />); | ||
expect(screen.getByText('Flag value is true')).toBeTruthy(); | ||
}); | ||
test('mock boolean flag correctly', () => { | ||
mockFlags({ 'my-boolean-flag': true }); | ||
render(<Welcome />); | ||
expect(screen.getByText('Flag value is true')).toBeTruthy(); | ||
}); | ||
|
||
test('mock ldClient correctly', () => { | ||
const current = useLDClient(); | ||
|
||
current?.track('event'); | ||
expect(current.track).toHaveBeenCalledTimes(1); | ||
}); | ||
test('mock ldClient correctly', () => { | ||
const current = useLDClient(); | ||
|
||
current?.track('event'); | ||
expect(current.track).toHaveBeenCalledTimes(1); | ||
}); | ||
}); |
2 changes: 1 addition & 1 deletion
2
packages/tooling/jest/example/react-native-example/src/welcome.tsx
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
11 changes: 3 additions & 8 deletions
11
packages/tooling/jest/example/react-native-example/tsconfig.eslint.json
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,10 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": [ | ||
"/**/*.ts", | ||
"/**/*.tsx", | ||
"/*.js", | ||
"/*.tsx" | ||
], | ||
"exclude": ["node_modules"] | ||
"extends": "./tsconfig.json", | ||
"include": ["/**/*.ts", "/**/*.tsx", "/*.js", "/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |
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