-
-
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.
- Loading branch information
Showing
65 changed files
with
1,052 additions
and
681 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { readFileSync } from 'node:fs'; | ||
import { join } from 'node:path'; | ||
import { test } from '@jest/globals'; | ||
import { CollectFbtOutput } from '../../../../packages/babel-plugin-fbtee/src/bin/collect.tsx'; | ||
|
||
test('fbtee strings are included in the collected strings of the example project', () => { | ||
const { phrases } = JSON.parse( | ||
readFileSync( | ||
join(import.meta.dirname, '../../../.source_strings.json'), | ||
'utf8', | ||
), | ||
) as CollectFbtOutput; | ||
|
||
expect( | ||
phrases.some( | ||
({ filepath }) => filepath === 'node_modules/fbtee/lib/index.js', | ||
), | ||
).toBe(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
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
76 changes: 76 additions & 0 deletions
76
packages/babel-plugin-fbtee/src/__tests__/__snapshots__/fbt-list-test.tsx.snap
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,76 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<fbt:list> 1`] = ` | ||
import { fbt } from "fbtee"; | ||
const x = fbt._( | ||
/* __FBT__ start */ { | ||
jsfbt: { | ||
m: [], | ||
t: { desc: "Lists", text: "Available Locations: {locations}." }, | ||
}, | ||
project: "", | ||
} /* __FBT__ end */, | ||
[fbt._list("locations", ["Tokyo", "London", "Vienna"])] | ||
); | ||
`; | ||
|
||
exports[`<fbt:list> 2`] = ` | ||
import { fbt } from "fbtee"; | ||
const x = fbt._( | ||
/* __FBT__ start */ { | ||
jsfbt: { | ||
m: [], | ||
t: { desc: "Lists", text: "Available Locations: {locations}." }, | ||
}, | ||
project: "", | ||
} /* __FBT__ end */, | ||
[fbt._list("locations", ["Tokyo", "London", "Vienna"], "and")] | ||
); | ||
`; | ||
|
||
exports[`<fbt:list> 3`] = ` | ||
import { fbt } from "fbtee"; | ||
const x = fbt._( | ||
/* __FBT__ start */ { | ||
jsfbt: { | ||
m: [], | ||
t: { desc: "Lists", text: "Available Locations: {locations}." }, | ||
}, | ||
project: "", | ||
} /* __FBT__ end */, | ||
[fbt._list("locations", ["Tokyo", "London", "Vienna"], null, "bullet")] | ||
); | ||
`; | ||
|
||
exports[`<fbt:list> 4`] = ` | ||
import { fbt } from "fbtee"; | ||
const x = fbt._( | ||
/* __FBT__ start */ { | ||
jsfbt: { | ||
m: [], | ||
t: { desc: "Lists", text: "Available Locations: {locations}." }, | ||
}, | ||
project: "", | ||
} /* __FBT__ end */, | ||
[fbt._list("locations", ["Tokyo", "London", "Vienna"], "or", "bullet")] | ||
); | ||
`; | ||
|
||
exports[`fbt.list() 1`] = ` | ||
import { fbt } from "fbtee"; | ||
fbt._( | ||
/* __FBT__ start */ { | ||
jsfbt: { | ||
m: [], | ||
t: { desc: "Lists", text: "Available Locations: {locations}" }, | ||
}, | ||
project: "", | ||
} /* __FBT__ end */, | ||
[fbt._list("locations", ["Tokyo", "London", "Vienna"], null, "or")] | ||
); | ||
`; |
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.