版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 1 година
123456789101112131415161718192021222324
  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. })