Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: chaomao/vue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

There isn’t anything to compare.

vuejs:main and chaomao:master are entirely different commit histories.

Showing with 10 additions and 9 deletions.
  1. +8 −7 test/unit/specs/utils.js
  2. +2 −2 test/unit/utils/prepare.js
15 changes: 8 additions & 7 deletions test/unit/specs/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/* global cleanupMocks, appendMock */
/* global cleanupMock, appendMock */

describe('Utils', function () {
afterEach(cleanupMocks)

var utils = require('vue/src/utils'),
config = require('vue/src/config')
@@ -242,8 +241,6 @@ describe('Utils', function () {
})

describe('parseTemplateOption', function () {

afterEach(cleanupMocks)

it('should convert a string template to a documentFragment', function () {
var template = '<div class="a">hi</div><p>ha</p>',
@@ -328,16 +325,20 @@ describe('Utils', function () {

describe('processOptions', function () {

var el

beforeEach(function() {
var id = 'utils-template-to-fragment',
template = '<div class="a">hi</div><p>ha</p>',
el = document.createElement('template')
template = '<div class="a">hi</div><p>ha</p>'
el = document.createElement('template')
el.id = id
el.innerHTML = template
appendMock(el)
})

afterEach(cleanupMocks)
afterEach(function () {
cleanupMock(el)
})

var options = {
partials: {
4 changes: 2 additions & 2 deletions test/unit/utils/prepare.js
Original file line number Diff line number Diff line change
@@ -15,8 +15,8 @@ function appendMock(el) {
document.getElementById('test').appendChild(el)
}

function cleanupMocks() {
document.getElementById('test').innerHTML = ''
function cleanupMock(el) {
document.getElementById('test').removeChild(el)
}

function mockHTMLEvent (type) {