版博士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.

12345678910111213
  1. const $ = require('../index');
  2. const config = require('./config');
  3. const jc1 = require('./code/simple1');
  4. const hc1 = require('./code/simple1.html');
  5. test('$.length: simple code', () => {
  6. expect($('var a = 1;').length).toBe(1)
  7. })
  8. test('$.length: js code index overflow should not show error', () => {
  9. expect($(jc1).find(`a`).length).toBe(4)
  10. })
  11. test('$.length: simple1 html code', () => {
  12. expect($(hc1, config.html).find('<$_$></$_$>').length).toBe(14)
  13. })