/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as mobxlite from 'mobx-react-lite'; import * as React from 'react'; import { EvaluationError } from '../stores/amlResults'; import { ISimulationTest } from '../stores/simulationTestsProvider'; import { DiffEditor } from './diffEditor'; export const ErrorComparison = mobxlite.observer( ({ test }: { test: ISimulationTest }) => { const errorsOnlyInBefore = test.errorsOnlyInBefore; const errorsOnlyInAfter = test.errorsOnlyInAfter; if ( !errorsOnlyInBefore || !errorsOnlyInAfter || !errorsOnlyInBefore.length || !errorsOnlyInAfter.length ) { return null; } const [expanded, setExpanded] = React.useState(false); return (
{`- Source: `} {errorsOnlyInBefore[0].tool}
{`- Number of errors that appear in the diagnostics strictly only before the change: `} {errorsOnlyInBefore.length}
{`- Number of errors that appear in the diagnostics strictly only after the change: `} {errorsOnlyInAfter.length}
{`- Diff of errors before and after : `}