<commit_before>// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const {assert} = chai;

import * as SDK from '../../../../../front_end/core/sdk/sdk.js';
import type * as IssuesManagerModule from '../../../../../front_end/models/issues_manager/issues_manager.js';
import {describeWithEnvironment} from '../../helpers/EnvironmentHelpers.js';
import {StubIssue} from './StubIssue.js';

describeWithEnvironment('issuesAssociatedWith', () => {
  let IssuesManager: typeof IssuesManagerModule;
  before(async () => {
    IssuesManager = await import('../../../../../front_end/models/issues_manager/issues_manager.js');
  });

  it('should return no issues if no issues exist', () => {
    const request = new SDK.NetworkRequest.NetworkRequest('', '', '', '', '', null);
    assert.strictEqual(IssuesManager.RelatedIssue.issuesAssociatedWith([], request).length, 0);
  });

  it('should return no issues if issues dont affect any resources', () => {
    const issue = new StubIssue('code', [], []);
    const request = new SDK.NetworkRequest.NetworkRequest('', '', '', '', '', null);<commit_msg>[cleanup] Remove "describeWithEnvironment" from RelatedIssues unit test<commit_after>// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

const {assert} = chai;

import * as SDK from '../../../../../front_end/core/sdk/sdk.js';
import * as IssuesManager from '../../../../../front_end/models/issues_manager/issues_manager.js';
import {StubIssue} from './StubIssue.js';

describe('issuesAssociatedWith', () => {
  it('should return no issues if no issues exist', () => {
    const request = new SDK.NetworkRequest.NetworkRequest('', '', '', '', '', null);
    assert.strictEqual(IssuesManager.RelatedIssue.issuesAssociatedWith([], request).length, 0);
  });

  it('should return no issues if issues dont affect any resources', () => {
    const issue = new StubIssue('code', [], []);
    const request = new SDK.NetworkRequest.NetworkRequest('', '', '', '', '', null);
{'fraction_non_alphanumeric': 0.17811355311355312, 'fraction_numerical': 0.004578754578754579, 'mean_word_length': 3.866369710467706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1373485', 'n_tokens_mistral': 622, 'n_tokens_neox': 588, 'n_words': 180}