Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/francy/js/packages/francy-core/src/__test__/   (GAP Algebra Version 4.15.1©)  Datei vom 17.3.2023 mit Größe 1 kB image not shown  

Quelle  json.test.js   Sprache: JAVA

 

import {expect} from 'chai';
import JsonUtils from '../util/json';
import * as d3 from "d3";

describe('Json utils', () => {

  window.d3 = global.d3 = d3;

  beforeEach(() => {
  });

  it('should return an object', () => {
    expect(JsonUtils).to.be.an('function');
    //expect(JsonUtils.parse(`{"mime": ${JsonUtils.MIME}, "canvas": {}}`)).to.be.an('object');
    expect(JsonUtils.parse({'mime': JsonUtils.MIME, 'canvas': {}})).to.be.an('object');
    expect(JsonUtils.parse('{"mime": "invalid", "canvas": {}}')).to.be.an('object');
    expect(JsonUtils.parse({'mime': 'invalid', 'canvas': {}})).to.be.an('object');
    expect(JsonUtils.parse('{"canvas": {}}')).to.be.an('object');
    expect(JsonUtils.parse({'canvas': {}})).to.be.an('object');
    expect(JsonUtils.parse('coutput sample')).to.be.an('object');
  });

  it('should return undefined', () => {
    expect(JsonUtils).to.be.an('function');
    expect(JsonUtils.parse(undefined)).to.be.an('undefined');
  });


  it('should return the MIME value', () => {
    expect(JsonUtils.MIME).to.equal('application/vnd.francy+json');
  });

});

Messung
CHZG
869910095

¤ Dauer der Verarbeitung: 0.1 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.