Summary: This is fairly experimental. The test passes, but I don't know how stable it will be when litho changes for example. However, it's easy to exclude specific attributes from the hierarchy, so maybe we can iterate if it breaks at first. It just takes a snapshot of the layout hierarchy from headless flipper, and compares it to it's known one. To run it: `cd headless-tests && DEVICE=emulator-5554 yarn test` while you have the sample app running on an emulator. To update the snapshots, just add `-u` to the end of that command. Reviewed By: danielbuechele Differential Revision: D15715674 fbshipit-source-id: 4fe6f83b60f8003d48aceb6468d93c075e6c38b8
26 lines
519 B
JSON
26 lines
519 B
JSON
{
|
|
"name": "headless-tests",
|
|
"version": "1.0.0",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"test": "jest",
|
|
"test:debug": "node --inspect node_modules/.bin/jest --runInBand"
|
|
},
|
|
"jest": {
|
|
"transform": {
|
|
"^.+\\.jsx?$": "babel-jest"
|
|
}
|
|
},
|
|
"devDependencies": {
|
|
"jest": "^24.7.1"
|
|
},
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"@babel/preset-env": "^7.4.5",
|
|
"@babel/preset-flow": "^7.0.0",
|
|
"babel-jest": "^24.8.0",
|
|
"canonical-json": "^0.0.4",
|
|
"lodash.memoize": "^4.1.2"
|
|
}
|
|
}
|