<commit_before>import { compileToFunctions } from 'vue-template-compiler';
import mount from '../../../../src/mount';
import If from '../../../resources/components/v-if/If.vue';

describe('setData', () => {
it('sets component data and updates nested vm nodes when called on Vue instance', () => {
    const wrapper = mount(If);
    expect(wrapper.find('.child.ready').length).to.equal(0);
    wrapper.setData({ ready: true });
    expect(wrapper.find('.child.ready').length).to.equal(1);
  });

  it('throws an error if node is not a Vue instance', () => {
    const message = 'wrapper.setData() can only be called on a Vue instance';
    const compiled = compileToFunctions('<div><p></p></div>');<commit_msg>[Formatting] Fix formatting in setData.spec<commit_after>import { compileToFunctions } from 'vue-template-compiler';
import mount from '../../../../src/mount';
import If from '../../../resources/components/v-if/If.vue';

describe('setData', () => {
  it('sets component data and updates nested vm nodes when called on Vue instance', () => {
    const wrapper = mount(If);
    expect(wrapper.find('.child.ready').length).to.equal(0);
    wrapper.setData({ ready: true });
    expect(wrapper.find('.child.ready').length).to.equal(1);
  });

  it('throws an error if node is not a Vue instance', () => {
    const message = 'wrapper.setData() can only be called on a Vue instance';
    const compiled = compileToFunctions('<div><p></p></div>');
{'fraction_non_alphanumeric': 0.1910344827586207, 'fraction_numerical': 0.002758620689655172, 'mean_word_length': 3.773026315789474, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3000515', 'n_tokens_mistral': 421, 'n_tokens_neox': 418, 'n_words': 119}