版博士V2.0程序
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

24 рядки
692 B

  1. const $ = require('../index');
  2. const config = require('./config');
  3. const jc1 = require('./code/simple1');
  4. const jc2 = require('./code/simple2');
  5. const hc1 = require('./code/simple1.html');
  6. test('$.insertSiblingNode: simple code', () => {
  7. expect(()=>{
  8. const G = $('var a = 1;');
  9. G.insertSiblingNode('','');
  10. }).toThrow();
  11. })
  12. test('$.insertSiblingNode: this[0] is null', () => {
  13. expect(()=>{
  14. const G = $('var a = 1;');
  15. G[0] = null
  16. G.insertSiblingNode();
  17. }).not.toThrow();
  18. })
  19. test('$.insertSiblingNode: simple1 html code', () => {
  20. expect(() => {
  21. const G = $(hc1, config.html);
  22. G.insertSiblingNode('','');
  23. }).toThrow();
  24. })