版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 

26 řádky
598 B

  1. const $ = require('../index');
  2. test('$.child', () => {
  3. expect(()=>{
  4. const res = $(`function a() {
  5. () => {
  6. var b = 1
  7. }
  8. }`)
  9. .find(`function a() {}`)
  10. .child('body.body.0.expression')
  11. expect(res.parent(2).generate().match('a'))
  12. }).not.toThrow();
  13. })
  14. test('$.child program child', () => {
  15. expect(() => {
  16. const res = $(`function a() {
  17. () => {
  18. var b = 1
  19. }
  20. }`)
  21. .child('body.body.0.expression')
  22. expect(res.parent(2).generate().match('a'))
  23. }).not.toThrow();
  24. })