<commit_before>describe( 'Flow#query()', function () {
  
  var flow;

  beforeEach(function () {
    flow = new Flow({
      a: {
        b: {}
      },
      b: {}
    });
  });

  it( 'should return the full path of a given query', function () {
    flow.query('//a').should.equal('//a/');
    flow.query('@program/a/@next').should.equal('//b/');
  });

  it( 'should return an array of paths when given multiple queries', function () {
    flow.query('//a', '@program/a/@next')
      .should.be.an.instanceOf(Array)
      .and.include('//a/', '//b/')
      .and.a.lengthOf(2);
  });

  it( 'should return false if one or more queries are invalid', function () {
    flow.query('//fubar').should.not.be.ok;
    flow.query('//a/','//fubar').should.not.be.ok;
  }); 

  it( 'should return false if one or more queries are inaccessible', function () {
    flow = new Flow({
      a: {
        _restrict: true
      },
      b: {}
    });
    flow.query('//a', '//b').should.be.ok;
    flow.go('//a');
    flow.query('//a', '//b').should.not.be.ok;
  });
<commit_msg>Re #20 - Added `.query()` test regarding the current-state<commit_after>describe( 'Flow#query()', function () {
  
  var flow;

  beforeEach(function () {
    flow = new Flow({
      a: {
        b: {}
      },
      b: {}
    });
  });

  it( 'should return the full path of a given query', function () {
    flow.query('//a').should.equal('//a/');
    flow.query('@program/a/@next').should.equal('//b/');
  });

  it( 'should be performed from the current state\'s perspective', function () {
    flow.query('b').should.not.be.ok;
    flow.go('//');
    flow.query('b').should.equal('//b/');
    flow.go('a');
    flow.query('b').should.equal('//a/b/');
  });

  it( 'should return an array of paths when given multiple queries', function () {
    flow.query('//a', '@program/a/@next')
      .should.be.an.instanceOf(Array)
      .and.include('//a/', '//b/')
      .and.a.lengthOf(2);
  });

  it( 'should return false if one or more queries are invalid', function () {
    flow.query('//fubar').should.not.be.ok;
    flow.query('//a/','//fubar').should.not.be.ok;
  }); 

  it( 'should return false if one or more queries are inaccessible', function () {
    flow = new Flow({
      a: {
        _restrict: true
      },
      b: {}
    });
    flow.query('//a', '//b').should.be.ok;
    flow.go('//a');
    flow.query('//a', '//b').should.not.be.ok;
  });

{'fraction_non_alphanumeric': 0.2279472382522671, 'fraction_numerical': 0.0016488046166529267, 'mean_word_length': 2.2797297297297296, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4786868', 'n_tokens_mistral': 869, 'n_tokens_neox': 842, 'n_words': 184}