UNPKG

473 BJavaScriptView Raw
1const CompositionAlgebra = require('algebra').CompositionAlgebra
2const realField = require('../src/realField')
3
4const R = CompositionAlgebra(realField)
5
6describe('CompositionAlgebra', () => {
7 describe('data', () => {
8 const pi = new R(Math.PI)
9
10 it('is enumerable', () => {
11 pi.propertyIsEnumerable('data').should.be.ok
12 })
13
14 it('is immutable', () => {
15 ;(() => {
16 'use strict'
17 pi.data = 2
18 }).should.throwError()
19 })
20 })
21})