mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
add test for snippets
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2021 The Pybricks Authors
|
||||
|
||||
import ace from 'ace-builds';
|
||||
|
||||
import './snippets';
|
||||
|
||||
type Snippets = {
|
||||
snippetText: string;
|
||||
scope: string;
|
||||
};
|
||||
|
||||
it('indents with tabs', () => {
|
||||
const { snippetText, scope } = ace.require('ace/snippets/python') as Snippets;
|
||||
|
||||
expect(scope).toBe('python');
|
||||
|
||||
for (const line of snippetText.split('\n')) {
|
||||
expect(line).not.toMatch(/^(\t* )+\t*/);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user