<commit_before>import check from './support/check';

describe('soaked member access', () => {
  it('turns soaked member access assignment into an `if` statement', () => {
    check(`
      canvasContext?.font = $('body').css('font')
    `, `
      if (typeof canvasContext !== 'undefined' && canvasContext !== null) { canvasContext.font = $('body').css('font'); }
    `);
  });

  it('turns soaked member access assignment expressions into a ternary expression', () => {
    check(`
      a(b?.c = d)
    `, `
      a(typeof b !== 'undefined' && b !== null ? b.c = d : undefined);<commit_msg>Skip soaked member access for now.<commit_after>import check from './support/check';

describe.skip('soaked member access', () => {
  it('turns soaked member access assignment into an `if` statement', () => {
    check(`
      canvasContext?.font = $('body').css('font')
    `, `
      if (typeof canvasContext !== 'undefined' && canvasContext !== null) { canvasContext.font = $('body').css('font'); }
    `);
  });

  it('turns soaked member access assignment expressions into a ternary expression', () => {
    check(`
      a(b?.c = d)
    `, `
      a(typeof b !== 'undefined' && b !== null ? b.c = d : undefined);
{'fraction_non_alphanumeric': 0.1933884297520661, 'fraction_numerical': 0.0, 'mean_word_length': 3.2943262411347516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7129738', 'n_tokens_mistral': 365, 'n_tokens_neox': 345, 'n_words': 100}