<commit_before>'use strict'

const assert=require('assert')
const cellLayout=require('../src/cell-layout')

describe("cellLayout",()=>{
	it("makes layout for node",()=>{
		const result=cellLayout([ // node layers/rows
			['A'],
		],[ // arc layers
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'}],
		],[ // arc layers
		]])
	})
	it("makes layout for diamond",()=>{
		const result=cellLayout([ // node layers/rows
			['A'],
			['B','C'],
			['D'],
		],[ // arc layers
			[ // arc rows
				[[0],[1,2]],
			],
			[ // arc rows
				[[1,2],[3]],
			],
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'},{},{},{}],
			[{},{node:'B'},{node:'C'},{}],
			[{},{},{},{node:'D'}],
		],[ // arc layers
			[ // arc rows
				[{rt:true},{rl:true,bl:true},{bl:true},{}],
			],
			[ // arc rows
				[{},{rt:true},{rl:true,rt:true},{bl:true}],
			],
		]])
	})
})<commit_msg>more cell layout tests<commit_after>'use strict'

const assert=require('assert')
const cellLayout=require('../src/cell-layout')

describe("cellLayout",()=>{
	it("makes layout for node",()=>{
		const result=cellLayout([ // node layers/rows
			['A'],
		],[ // arc layers
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'}],
		],[ // arc layers
		]])
	})
	it("makes layout for diamond",()=>{
		const result=cellLayout([ // node layers/rows
			['A'],
			['B','C'],
			['D'],
		],[ // arc layers
			[ // arc rows
				[[0],[1,2]],
			],[
				[[1,2],[3]],
			]
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'},{},{},{}],
			[{},{node:'B'},{node:'C'},{}],
			[{},{},{},{node:'D'}],
		],[ // arc layers
			[ // arc rows
				[{rt:true},{rl:true,bl:true},{bl:true},{}],
			],[
				[{},{rt:true},{rl:true,rt:true},{bl:true}],
			]
		]])
	})
	it("makes layout for N-shape",()=>{
		const result=cellLayout([ // node layers/rows
			['A','B'],
			['C','D'],
		],[ // arc layers
			[ // arc rows
				[[0,1],[3]],
				[[0],[2]],
			]
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'},{node:'B'},{},{}],
			[{},{},{node:'C'},{node:'D'}],
		],[ // arc layers
			[ // arc rows
				[{bt:true,rt:true},{rl:true,rt:true},{rl:true},{bl:true}],
				[{rt:true},{rl:true},{bl:true},{bt:true}],
			]
		]])
	})
	it("makes layout with vertical arcs going through node layers",()=>{
		const result=cellLayout([ // node layers/rows
			['A'],
			['B','C'],
			['D'],
			['E'],
		],[ // arc layers
			[ // arc rows
				[[0],[1,2]],
			],[
				[[2],[3]],
			],[
				[[0,3],[4]],
			]
		])
		assert.deepEqual(result,[[ // node layers/rows
			[{node:'A'},{},{},{},{}],
			[{bt:true},{node:'B'},{node:'C'},{},{}],
			[{bt:true},{},{},{node:'D'},{}],
			[{},{},{},{},{node:'E'}],
		],[ // arc layers
			[ // arc rows
				[{bt:true,rt:true},{rl:true,bl:true},{bl:true},{},{}],
			],[
				[{bt:true},{},{rt:true},{bl:true},{}],
			],[
				[{rt:true},{rl:true},{rl:true},{rl:true,rt:true},{bl:true}],
			]
		]])
	})
})
{'fraction_non_alphanumeric': 0.3287764866712235, 'fraction_numerical': 0.008544087491455913, 'mean_word_length': 3.254360465116279, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4398185', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1126, 'n_words': 178}