'JEST why I cant console.log all testids?
Why I can not see all my testIDs ?
if I console.log this: page.getAllByTestId then I get this:
page: function getAllFn(args, queryOptions) {
const results = queryAllByQuery(instance)(args, queryOptions);
if (results.length === 0) {
throw new _errors.ErrorWithStack(getMissingError(args), getAllFn);
}
return results;
}
at Object.<anonymous> (__tests__/App-Input-test.js:10:13)
code:
import React from 'react';
import Login from '../components/Login';
import { render } from '@testing-library/react-native';
describe('Login Screen', () => {
it('should go to home page on login', () => {
const page = render(<Login />)
console.log('page: ' + page.getAllByTestId);
});
});
............................................................................................................................................................................................................................................................................................................................................................................................
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
