@@ -57,31 +57,6 @@ test('test get instance', () => {
5757 expect ( codeSnippetContentsService ) . toBeInstanceOf ( CodeSnippetContentsService ) ;
5858} ) ;
5959
60- describe ( 'test get' , ( ) => {
61- it ( 'test getData' , async ( ) => {
62- handleRequest (
63- codeSnippetContentsService . contentsManager ,
64- 200 ,
65- DEFAULT_FILE
66- ) ;
67- const model = await codeSnippetContentsService . getData ( '/foo' , 'file' ) ;
68-
69- expect ( model . content ) . toBe ( DEFAULT_FILE . content ) ;
70- } ) ;
71-
72- it ( 'test getDataError' , async ( ) => {
73- handleRequest (
74- codeSnippetContentsService . contentsManager ,
75- 201 ,
76- DEFAULT_FILE
77- ) ;
78-
79- const model = await codeSnippetContentsService . getData ( '/foo' , 'file' ) ;
80-
81- expect ( model . content ) . toBe ( undefined ) ;
82- } ) ;
83- } ) ;
84-
8560test ( 'test save' , async ( ) => {
8661 handleRequest ( codeSnippetContentsService . contentsManager , 200 , DEFAULT_FILE ) ;
8762
@@ -93,40 +68,3 @@ test('test save', async () => {
9368 expect ( saved . content ) . toBe ( 'hello, world!' ) ;
9469 expect ( saved . path ) . toBe ( 'foo/bar' ) ;
9570} ) ;
96-
97- describe ( 'test rename' , ( ) => {
98- it ( 'test rename' , async ( ) => {
99- handleRequest (
100- codeSnippetContentsService . contentsManager ,
101- 200 ,
102- DEFAULT_FILE
103- ) ;
104-
105- const oldPath = 'foo/test' ;
106- const newPath = 'foo/test2' ;
107- const renamed = await codeSnippetContentsService . rename ( oldPath , newPath ) ;
108-
109- expect ( renamed . path ) . toBe ( 'foo/test2' ) ;
110- } ) ;
111-
112- it ( 'test rename error' , async ( ) => {
113- handleRequest (
114- codeSnippetContentsService . contentsManager ,
115- 201 ,
116- DEFAULT_FILE
117- ) ;
118-
119- const oldPath = 'foo/test' ;
120- const newPath = 'foo/test2' ;
121- const renamed = await codeSnippetContentsService . rename ( oldPath , newPath ) ;
122-
123- expect ( renamed . content ) . toBe ( undefined ) ;
124- } ) ;
125- } ) ;
126-
127- test ( 'test delete' , async ( ) => {
128- handleRequest ( codeSnippetContentsService . contentsManager , 200 , DEFAULT_FILE ) ;
129-
130- const path = 'foo/test' ;
131- await codeSnippetContentsService . delete ( path ) ;
132- } ) ;
0 commit comments